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.
Import Table Data From Website
Using the Power Query feature, you can pull live data directly from a website into Excel.
- Open the Excel file that you wish to import the data into.
- In the Ribbon, select Data > Get & Transform Data > From Web.
- Type in the URL from which you wish to fetch the data and click OK.
- In the Navigator, on the left, select the table to be imported, then click Transform Data.
- 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.
- The table will then be loaded into Excel with two new Ribbon tabs available: Table Design and Query.
How to Import an HTML Table into Google Sheets
- Open the Google sheet where the data needs to be imported to and select the cell where the data will be positioned.
- Then, type in an HTML import formula such as the one shown below:
=IMPORTHTML("http://www.floatrates.com/historical-exchange-rates.html", "table",0)
- As soon as you press ENTER, Google Sheets will try to load the data into the sheet.
Once done, the data will be displayed.