• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Download VaR file from all the website of all the 3 Exchanges using VBA

I want to download VaR (Value at Risk) files on daily basis from all the 3 exchanges(BSE, NSE & MSE - India)
6 files from MSE
6 files from NSE and
1 file from BSE

I tried the coding given by @SirJB7 in http://forum.chandoo.org/threads/download-file-from-url-using-vba.15636/
Though it's not showing any error while running the macros however it not giving the output file also.

I'm mentioning the link for all the 3 websites along with the file names (Date Wise - "Daily Reports for 01-Jun-2017"). Need to download all these files on daily basis date wise.

1) MSE
URL - http://www.msei.in/downloads/equity-reports/daily.aspx
File Name -
Downloaded File Name Name Visible on the Website
(i) MSEI-EQ_VaR-20170601-01-I VaR begin day file (Var Files)
(ii) MSEI-EQ_VaR-20170601-02-I VaR 1st Intra-day file (Var Files)
(iii) MSEI-EQ_VaR-20170601-03-I VaR 2nd Intra-day file (Var Files)
(iv) MSEI-EQ_VaR-20170601-04-I VaR 3rd Intra-day file (Var Files)
(v) MSEI-EQ_VaR-20170601-05-I VaR 4th Intra-day file (Var Files)
(vi) MSEI-EQ_VaR-20170601-06-E (Var end of the day file (Var Files)

2) NSE
On NSE Website, when you click on the file it opens the file in then & there. It's not getting downloaded. You need to select the whole content and paste it in an excel file and separate it using comma delimited.
URL - https://nseindia.com/products/content/equities/equities/homepage_eq.htm
File Name - (i) VaR Begin Day File
(ii) VaR 1st Intra-day File
(iii) VaR 2nd Intra-day File
(iv) VaR 3rd Intra-day File
(v) VaR 4th Intra-day File
(vi) VaR End of Day File

3) BSE

URL - http://www.bseindia.com/markets/equity/EQReports/margin.aspx?expandable=2
Downloaded File Name Name Visible on the Website
(i) VAR010617.zip Download VaR & ELM For Trading Day 01/06/2017


Kindly guide how to download all these files from all the three websites using VBA.
 
Search for "winhttp" in this forum and you'll find excellent code written by Marc L. Start from there.
 
Back
Top