See all How-To Articles

How to Import an HTML Table into Excel or Google Sheets

This tutorial demonstrates how to import an HTML table into Excel or Google Sheets.

 

excel importweb intro

 

Import Table Data From Website

Using the Power Query feature, you can pull live data directly from a website into Excel.

1. Open the Excel file that you wish to import the data into.

2. In the Ribbon, select Data > Get & Transform Data > From Web.

 

importweb ribbon

 

3. Type in the URL from which you wish to fetch the data and click OK.

 

importweb url

 

4. In the Navigator, on the left, select the table to be imported, then click Transform Data.

 

importweb transform data

 

5. The Power Query Editor will open. Manipulate the table as required – in this case, select Use First Row as Headers. Then to load the data, click Close and Load.

 

importweb query

 

6. The table will then be loaded into Excel with two new Ribbon tabs available: Table Design and Query.

 

importweb querytab

 

How to Import an HTML Table into Google Sheets

1. Open the Google sheet where the data needs to be imported to and select the cell where the data will be positioned.

2. Then, type in an HTML import formula such as the one shown below:

=IMPORTHTML("http://www.floatrates.com/historical-exchange-rates.html", "table",0)

3. As soon as you press Enter, Google Sheets will try to load the data into the sheet.

 

import web gs loading

 

Once done, the data will be displayed.

 

importweb gs loaded