Guide

How to import a table from a website into Google Sheets

Google Sheets can pull a table straight from a web page with one formula. When that doesn't work, there are two other ways that do. Here's when to use which.

Method 1: the IMPORTHTML formula

In an empty cell, type:

=IMPORTHTML("https://example.com/page", "table", 1)
  • The first part is the address of the page, in quotes.
  • "table" tells Sheets to look for tables (use "list" for bulleted lists).
  • The number is which table on the page you want, counting from 1.

Not sure which number? Try 1, then 2, and so on until you see the right data. Sheets refreshes the import on its own from time to time, so the sheet stays roughly up to date with the page.

Keep only some columns

Wrap the import in QUERY to pick columns. This keeps columns 1 and 3 of the second table:

=QUERY(IMPORTHTML("https://example.com/page", "table", 2), "select Col1, Col3")

When IMPORTHTML fails

You'll see an error or an empty result when:

  • the page needs a login: Google's servers fetch the page, not your browser, so they can't see what you can see when signed in,
  • the page builds the table with JavaScript after it loads,
  • the "table" is really a grid of div elements styled to look like a table, or
  • the site blocks automated requests.

In those cases, use one of the methods below.

Method 2: copy and paste values only

  1. Select the table on the page and copy it.
  2. In Sheets, click the top-left cell and paste with Ctrl+Shift+V (Cmd+Shift+V on a Mac). That pastes values only, without the page's styling and links.

Quick for small tables. Merged cells and hidden columns can shift the data, so check the last column lines up with its header.

Method 3: a browser extension

An extension works on the page in your own browser, so it can read tables behind a login and tables built with JavaScript. With the free TableTap extension for Chrome:

  1. Open the page and click the TableTap button in the toolbar.
  2. Pick the table from the list. Hovering highlights it on the page, so you know you have the right one.
  3. Click Copy Excel/Sheets, then paste into Sheets. Each value lands in its own cell.

TableTap also detects grids that use accessible table roles instead of a real table element, expands merged cells into a proper grid and skips hidden cells. Need a file instead? Download a CSV and use File > Import in Sheets. The data stays in your browser: nothing is sent to a server.

Cleaning up after the import

  • Numbers that won't add up: check the spreadsheet locale under File > Settings. A page that writes 1.234,56 needs a locale that uses a comma for decimals, or a Find and Replace before converting.
  • Footnote markers like [1]: remove them with Edit > Find and replace, using "Search using regular expressions" and the pattern \[\d+\].
  • Extra spaces: Data > Data cleanup > Trim whitespace.

Which method to use

  • A public table you want to keep up to date: IMPORTHTML.
  • A small table, once: paste values only.
  • Tables behind a login or built with JavaScript, or when IMPORTHTML shows an error: an extension.

Doing this often? TableTap is a free Chrome extension that lists every table on a page and copies it ready for Excel or Google Sheets. TableTap Pro (€19 once) adds real .xlsx export and clean-up options.