Use IMPORTHTML to Get Website Data into Your Google Sheets
In the information age, it is easy to find real data to use rather than contrived situations in a textbook or on a worksheet. Who is Bob and why is he carrying 40 watermelons? Use this student guide with your students to help them get started with IMPORTHTML.
Getting the Data
Google searching is the “easy” part. (Do not assume students know how to Google Search effectively. They can put words in a search box but need to be taught how to research using the web.) Once students find websites that contain data, how do they get it into a spreadsheet to organize and analyze?
If a website contains a table or list students will want to copy the link to the page. In a Google Sheets spreadsheet (http://sheets.new) type the formula =IMPORTHTML(
The link to the website will need to be in quotations.
Table or List
After a comma students will want to see if there is a table or list on the webpage. In quotations, “table” is the next part of the formula.
The last part of the formula is which table or list on the page. Start with 1 and edit to 2, 3, etc… to pull the desired data from the website.
Example: California WildFires
Wikipedia has lots of data tables. In this Google Sheets spreadsheet, I used the IMPORTHTML formula with the Wikipedia site on California wildfires.
Notice I have multiple tabs along the bottom of the spreadsheet.
In cell A1 I have the formula =importhtml(“https://en.wikipedia.org/wiki/2018_California_wildfires”,”table”,1) and a range of data
Duplicate the Tab
On the tiny triangle on the tab at the bottom, choose “Duplicate.” This will copy the sheet and the formula.
Double click on cell A1 and modify the table reference from 1 to 2. I repeated this step until I had all the tables in the spreadsheet.
Once I had imported all of the tables, I imported all of the lists. Modifying “table” to “list” pulls lists of information out of the website.
Analyze the Data
Pulling data into a spreadsheet is a great digital literacy lesson all in itself, but then what will students DO with the data? It is an essential skill that students can manage messy data sets (something textbooks fail to provide) and then determine if the data is useful and what to do with it.
I have created a Google Docs guide to share with students to help them get started with IMPORTHTML.