Skip to content

Why IMPORTHTML returns an empty table (and what to use instead)

By Andrii Boiko · 2026-10-23 · 4 min

IMPORTHTML is the quickest way to pull a table from a web page into Google Sheets — until it returns nothing, an error such as Could not fetch URL, or the wrong table.

How IMPORTHTML works

=IMPORTHTML(url, "table", index) asks Google’s servers to download the page’s raw HTML and read the n-th <table> (or <ul> / <ol>) from it. Everything that depends on your browser running JavaScript is invisible to it.

Four reasons it fails

  1. The table is built by JavaScript. The raw HTML contains an empty container; the rows appear after scripts run in your browser. Test: right-click → View page source and search for a value from the table. If it is not there, IMPORTHTML cannot see it.
  2. The site blocks Google’s fetcher. You get Could not fetch URL or a page about bots.
  3. The page needs a login or cookies. Google’s servers are not logged in as you.
  4. Wrong index. Infoboxes, navigation and layout tables count too, so “table 1” is often not the one you see.

What to use instead

  • Copy from the rendered page. A browser extension reads what you see after scripts have run — see copy a table to Google Sheets.
  • Look for an export button or a data file. Many sites offer CSV, or load their data from a JSON address you can see in the browser’s Network tab.
  • Use the site’s API if it has one.

When IMPORTHTML is still the right tool

For a static page, a stable table and a need for automatic refresh, it is excellent and free. Use it first, then fall back when the test above fails.

Add CleanTable to Chrome — free

Related

Copy your next table the clean way

Free for single tables, no row limit, no account. Pro is a one-time payment.

Add to Chrome — it’s free