How to Import an HTML Table into Excel or Google Sheets

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on October 29, 2022

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

 

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

 

importweb url

 

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

 

importweb transform data

 

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

 

  1. 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)
  1. 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

AI Formula Generator

Try for Free

See all How-To Articles