I’ve been looking for a quick and easy solution to scrape an HTML table into a usable format. Of course, there are numerous solutions to do that in some small Perl/PHP/Python programme, but I found another path especially elegant. It turns out, Google Docs has an importHTML() function in Spreadsheets:
=importHTML(“http://www.parlamentswahlen-2011.ch/resultate-a-z.html”,”table”,1)
scrapes the first (1) HTML table element (“table”) from http://www.parlamentswahlen-2011.ch/resultate-a-z.html into your Google spreadsheet. Very nice!
Hat tips to OUseful.Info for this trick :)
One thought on “Scraping tabular data from the web”