Select Page

# 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?

## IMPORTHTML

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.
=IMPORTHTML(“https://en.wikipedia.org/wiki/2018_California_wildfires”,

### 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.

=IMPORTHTML(“https://en.wikipedia.org/wiki/2018_California_wildfires”,“table”,

=IMPORTHTML(“https://en.wikipedia.org/wiki/2018_California_wildfires”,“list”,

### Which One?

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.

=IMPORTHTML(“https://en.wikipedia.org/wiki/2018_California_wildfires”,”table”, 1)

## 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.

### Import Lists

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.

## Student Guide

I have created a Google Docs guide to share with students to help them get started with IMPORTHTML.

FRESNO, CA