Valentin.S
New Member
in the past I used these two lines of code to download.csv files from the website euromillions
First .csv file = EuroMillionsGameData.cvs
Second .csv file =EuroMillionsFinancialData.cvs
But recently, they have made changes to the website, and the code no longer works.
I've noticed that it now works with java script post method, but I don't know how this works.
How can I get this done with VBA?
Website address:
http://www.nationale-loterij.be/nl/onze-spelen/euro-millions/resultaten
the two files are
Trekkingresultaten and Financieleresultaten
Code:
Sheets(2).QueryTables.Add("URL;http://www.nationale-loterij.be/Controls/Draw/DownloadResults.ashx?productId=e07ce0de-9072-436f-b6ec-9a7e9475fa6f&StartDate=" & Sheets(1).Cells(4, 2).Value & "&EndDate=" & Year(Now()) & "1231&ExportData=True", Destination:=Range("A1")).Refresh True
Sheets(3).QueryTables.Add("URL;http://www.nationale-loterij.be/Controls/Draw/DownloadResults.ashx?productId=e07ce0de-9072-436f-b6ec-9a7e9475fa6f&StartDate=" & Sheets(1).Cells(4, 2).Value & "&EndDate=" & Year(Now()) & "1231&ExportData=false", Destination:=Range("A1")).Refresh True
First .csv file = EuroMillionsGameData.cvs
Second .csv file =EuroMillionsFinancialData.cvs
But recently, they have made changes to the website, and the code no longer works.
I've noticed that it now works with java script post method, but I don't know how this works.
How can I get this done with VBA?
Website address:
http://www.nationale-loterij.be/nl/onze-spelen/euro-millions/resultaten
the two files are
Trekkingresultaten and Financieleresultaten
Last edited: