Import a website table into Google Sheets using IMPORTHTML

Use the IMPORTHTML function to pull a table from a public webpage into Google Sheets so it stays updated automatically — great for prices, rankings, and lists.

What the video covers

Show how to use the IMPORTHTML formula to import an HTML table from a public web page into a Google Sheets cell range and how to adjust which table is imported.

Watch the video on YouTube

Step-by-step instructions

  1. Open your Google Sheets file and pick a cell
    Select the cell where you want the top-left corner of the imported table to appear.
  2. Enter the IMPORTHTML formula
    Type =IMPORTHTML("page_url","table",n) replacing page_url with the webpage URL in quotes and n with the table index number (for example 1).
  3. Example
    For the first table on https://example.com, use: =IMPORTHTML("https://example.com","table",1)
  4. Submit the formula
    Press Enter. Google Sheets will fetch the table and populate the sheet starting at the selected cell.
  5. Adjust the table index if needed
    If the wrong table loads, change the final number (1, 2, 3…) to target a different table on the same page.
  6. Verify and use the data
    Confirm the imported rows and columns match the webpage table. Use the range in formulas or dashboards; it will refresh automatically when the source changes.
  7. What to do if it fails
    Check the URL is public and contains a real HTML table. Try other index numbers, or use IMPORTXML if the data is not in a table. If the site requires login or blocks bots, IMPORTHTML will not work.

Watch the video

Video thumbnail for Import a website table into Google Sheets using IMPORTHTML Play tutorial

Watch on YouTube

Why it matters

Copy-pasting table data is repetitive and error-prone. IMPORTHTML automates fetching structured table data from a webpage and refreshes it automatically, saving time and keeping reports up to date.

Check your result

The sheet should populate with the webpage table rows and columns in the chosen cell. If the wrong table appears, changing the table index should select the correct one. The imported range should update when the source page changes.

Troubleshooting

If you see an error or no data: ensure the page URL is correct and publicly accessible (no login or paywall); confirm the page actually contains an HTML table; try different table index numbers (1, 2, 3…) if the first table isn’t the one you want; use a full https:// URL; consider IMPORTXML if the content isn’t in a table. If data still won’t load, the site may block automated requests.