I'm trying to get the data from:
"http://www.css.ethz.ch/en/services/css-partners.html?page=1" to "...page=180"
(2691 results/180 pages) into Excel as three columns (name, country, description) as a one off to hold the same information locally and make it quicker to search.
I figure VBA could do this easily, but I'm totally new to it and don't really know where to start :S Any pointers appreciated!
I've set up something like this at work.
I used this reference. I recommend you read it.
Preparation:
Get the computed HTML of the page(s) section(s) you're targeting (i.e. use F12 developer console) to understand the structure of it.
It is best if you already understand the Document Object Model and how you traverse it with JavaScript, specifically using query selectors, child nodes and so on; the Microsoft IE interface somewhat mirrors it. e.g. in JavaScript:
Add references to "Microsoft Internet Controls" and "Microsoft HTML Object Library" to your VB project.
The sub:
Initialise and open Internet Explorer in memory.
Navigate to the page.
Wait until the page has loaded.
Traverse the Document Object Model of the page and store relevant details as required.
Write the relevant details to a range.
Loop within article elements and loop pages (not shown).
Close and destroy instance of Internet Explorer.
Put together:
I leave it as an exercise for you to work out how to loop within the article elements on the page, how to loop within all the pages you want to target, and how to write the information extracted to the appropriate Ranges in Excel.