I am trying to create a macro that automatically connect to a web page and import in excel the data from a table. My problem is that Excel Query tool does not recognize the table, I think because it's create by a script in the page, and so I cannot use the standard way. For now, I am using this method:
- Copy the data into the clipboard
- Run a vba macro than gets the data from the clipboard and imports it in Excel
However, I have more than 20 web pages to import every time and I would like a "standalone" macro which, given the url of the page, can import the data in excel.
The webpage I am interested in is: http://www.investing.com/indices/us-30-historical-data I am using excel 2010
Can anyone help me?
Another approach would be to make an HTTP request like
and parse the result. I haven't tried it myself though.
Try this