macro to download a file from a website

jek40

Active Member
Joined
Jan 17, 2005
Messages
317
Hi,

At work I am often downloading the same file and then using a macro to copy and paste it into an excel workbook.

Would it be feasable to write a macro to go to the website and download the file?

if so, I would appreciate any help in getting me started in the right direction.


Thanks,
John
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
in excel data-import external dta(in some versions get external data)-new web query-
in the new webquery window type or copy paste the web address
in latest versions the tables will have green arrow mark. if you tick it will trun into a tick and then click import (in older versions you have to give the number of the table which you have to get by trial and error or looking at the source)
you copy the table from this sheet (sheet1) to another sheet (sheset2) for archival.
nex time you have only to refresh the data in sheet 1. (data-import external data-refesh. if you open the toolbar "exernal data" you will have an icon exclamation mark in red for refreshing). The old data will be removed and the data will be refreshed in sheet1. again copy sheet 1 to sheet2 at the bottom of the old data.
if you want to automate create a macro making these steps and tailor the macro to suit you.

if any problem revert to the forum.
 

Forum statistics

Threads
1,136,352
Messages
5,675,280
Members
419,559
Latest member
BraytonM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top