Excel download file from url






















Connect and share knowledge within a single location that is structured and easy to search. I got a code to download a CSV file from a website that requires credentials. I got a code thanks to this website and I could adapted to my needs. My relevant part of code is:. Sorry but I cannot provide the real url. Anyways, this code has been working perfectly since September And it still works perfectly every day.

The computers that execute this code are all of them Windows 7 and Excel and 64 bits. None of them fail. But now, this task is going to be outsourced to another office.

There, the computers are Excel , Windows 10 and 64 bits. And the code does not work there. None of this solved my problem. I'm pretty sure the solution it's really easy, because the code works perfectly in Excel , but I can't find what I'm missing here. I would like to get a code that works in any case, but I would accept also a solution that works only in Excel and Windows 10 if it's the only way.

I know some values:. I made a new easy code like this:. Maybe I should change something about the encoding? The issue here is that I'm just the data guy, the analyst, so plenty of information posted here sounds really hardcore to me. Meanwhile, and based on information here, finally coded something totally different that works on all machines.

It works on Windows 7 and 10, and it works on Excel and installed as 32 bits and Excel installed as 64 bits. I'm adding the code here, so maybe somebody can explain why it works properly, but it looks like the issue was the base64 encoding.

Sub Code is fine. Check the references in tools menu in vba and make declaration ptrsafe as below. Yeah I have tried saving it as an xls and it wouldn't work. I wasn't sure if there was a tool that could change the encoding after downloading or something like that.

This has been very tricky and driving me nuts! But in my case, the download file is a direct. I am still facing the issue. Learn more. Toggle main menu visibility alteryx Community. Sign Up Sign In. As a footnote, this was super simple. And I'm disappointed you couldn't do this on your own. I might not have been able to do this 5 years ago, and that's why I decided to help.

If you want to code. And that's all you need to start. Then you need to learn how to search, and make different components to work together the way you require them too. And with SO, if you show some effort, we are happy to help. We are a community, not a place to solve your homework. Try harder next time. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Busy DoEvents 'wait until IE is done loading page.

Range "C7:C". Select Selection. Document 'Assign text string to textarea. Click 'Timedelay 2 Application. I am interest in managing to download the file, however if you can help and on step 1 or 5 it will be highly appreciated. Thanks a lot for your time and help in advance! Excel Facts. Click here to reveal answer. You must log in or register to reply here. Similar threads H. Is there a way to lock the position, let's say , in the upper right corner and have it stay there?

This would be quite useful for an EXIT button, that I have created, that will close the program without saving it's a read-only file. Thanks to all the wonderful people here that have been so helpful and give us their valuable insight and time.

I have an excel form, I want my users to be able to open the form, fill in appropriate data, then click the save button. When the button is clicked, the data in the form should be saved to a new file and then the original form should be reset clear all values for a new set of data entry.

When the data is saved, I want the new excel sheet to be saved to a location specified within the macro so the user doesn't have any options and I want the title of the new file to be the value of one of the cells.

I'm new to macros and would appreciate any help this board can offer. Hi there, I have a piece of code called ConvertDates that formats data contained on 6 worksheets. The 6 data sheets all contain a data connection to a website of foreign exchange tables.

What I want is for my code to execute as soon as the data connection refresh has finished. When I use the statement Code: The code executes the macro whilst the refresh is still happening, thereby screwing up my results. I don't really want to use a timed wait, because the refresh speed is going to vary from user to user. Is there some way I can tell excel to wait till the refresh has finished and then execute the code? Any help would be hugely appreciated. Hi all. I have set up a workbook that is sent out to lots of different users.

They each keep and use their own copy. I have set it up so that everything looks OK and is visible on MY screen, but I'm conscious that some users may have different screen sizes, different toolbars set up, and so on, which might make some parts not immediately visible to them. I have set up an auto-execute macro which automatically sets the zoom factor to best fit, for several of the worksheets, and this works fine.

Here's the code that does it. Code: By repeating this code for each worksheet, I can make each one be zoomed just right. However, the file contains 8 sheets that are all identically laid out, except the number of rows is different. What I want to do is go to the worksheet that has the largest number of rows it's always the same worksheet, so I know which one it is , set the zoom factor for THAT worksheet which I can do, and it always has the same number of rows , and then take THAT zoom factor, whatever it is - and it will vary depending on the user - and apply that to the other worksheets that have a similar layout.

I could just go through each worksheet and zoom it automatically, but that would mean that some of the sheets looked very large, others very small, and I'd like them to have a consistent appearance. I could also specify a range on each worksheet that was similar to the appropriate range on the longest worksheet, and zoom that automatically, but that's not ideal either, because some of the row heights vary from sheet to sheet, and again I'll end up with different font sizes.

Anyone know how to do this? I am using the code below to disable the save function very successafully. However, is there a work around to allow a macro to save?

Hi all, I've had a long search through your pages to see if this question has been answered before but having browsed through about 50 pages worth of threads I couldn't see anything, but if I am repeating prior information I do apologise.

I've written a macro that is relatively simple. It just takes some information in one format, rearranges it, adds some formatting and performs some calculations. Nothing incredibly fancy but it works fine on my computer. Now, I need to share this macro with some other people, so basically I've just sent that excel file on to the people that need to use it.

Should be fine and in most cases it is, however there is one user who although they can open the file, can't seem to get the macro to run properly. It seems to get a small way through the macro but then stop with no error messages or any sign that it hasn't completed properly.

It is the same Operating system and the same version of Excel.



0コメント

  • 1000 / 1000