vba download data through url

playtime

New Member
Joined
Apr 11, 2015
Messages
9
this is just a part of my vba program which downloads the zip files using url.

I was able to download zip files till 31-dec-20 it still works fine if i put last year dates but, doesnt work for 2021 dates.

The server has data only for below dates
22-dec-20 https://www1.nseindia.com/content/historical/EQUITIES/2020/DEC/cm22DEC2020bhav.csv.zip
23-dec-20 https://www1.nseindia.com/content/historical/EQUITIES/2020/DEC/cm23DEC2020bhav.csv.zip
04-Jan-21 https://www1.nseindia.com/content/historical/EQUITIES/2021/JAN/cm04JAN2021bhav.csv.zip

for 4th-Jan-2021, if i visit the website directly i can download the file by clicking on the link. But, if I copy the same link and paste on address bar the file doesnt download.
pls help I need to download more files using vba.

here is the server address

and I am concerned with the very first file in the left column named" Bhavcopy file(csv) under daily reports

thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,217,441
Messages
6,136,651
Members
450,022
Latest member
Joel1122331

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
Back
Top