562 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Advice on how to scrape tables of data or HTML from webpages using VBA
Part one of a three-part series of blogs
You can use VBA to extract data from web pages, either as whole tables or by parsing the underlying HTML elements. This blog shows you how to code both methods (the technique is often called "web-scraping").
If yoiur VBA skills aren't up to scratch, we've got lots of VBA training material on this website to help you!
If you want to get at tables of data published to a website (such as currency exchange rates, fantasy football tables or weather forecast data), the easiest way to do it is by adding a linked table into Excel:
An example - importing a list of all forthcoming advanced Excel courses from the Wise Owl site.
While the data for this example is years out of date, all the principles (and the VBA) are still valid.
This is a bit harder, since you need to understand a bit about HTML, and be prepared to work hard to parse data in VBA. The example we'll cover will download a list of all of the questions from the StackOverflow home page:
What the downloaded data will look like after running our macro.
The rest of this blog shows how to do each of these tasks, beginning with the simpler one: querying a table of data on a website.
|Parts of this blog|
25 Aytoun Street