IMPORTHTML says “Imported content is empty”: causes and fixes
Google's servers fetched the page but found no table or list at the number you asked for. Usually the number points at the wrong table, or the page builds its table with JavaScript, which IMPORTHTML does not run. Look at the page's source to tell which. If the data isn't there, copy it from your browser instead.
How IMPORTHTML reads a page
=IMPORTHTML("address", "table", 1) is run by Google's servers, not by your
browser. They download the page's HTML as a visitor who is not signed in and does not run the
page's scripts, count its tables (or its bulleted and numbered lists, with
"list") from the top, and return the one at your number.
Find the cause in a minute
- Open the page in Chrome, press Ctrl+U to see its source, then Ctrl+F and search for a value you can see in the table. Not found: the page builds the table with JavaScript after it loads, and IMPORTHTML cannot see it.
-
Found: search the source for
<table. The number of matches is how many tables the page has, layout tables included. Try each number in the formula. -
Found, but no table around it: the page shows its data as blocks rather than a table, as
most shops and search results do.
"list"works only for real bulleted or numbered lists; for blocks, IMPORTXML with an XPath expression can pick out one field per formula. - Open the address in a private window. A cookie banner, a sign-in page or a "verify you are human" check there is what Google receives instead of the data.
Error messages and what they mean
| Message | Meaning | What to do |
|---|---|---|
| Imported content is empty. | No table or list at that number in the HTML Google received | Try other numbers; check the source for the data |
| Could not fetch url | Google's servers could not download the page: it needs a login, blocks them, or is down | Check the address; copy the data from your browser |
| Resource at url contents exceeded maximum size. | The page is too big to import | Use the site's own export, or copy from your browser |
| Array result was not expanded because it would overwrite data | Cells below or to the right of the formula are not empty | Clear them, or move the formula |
When no formula can reach the data
If the data is not in the page's source, or the page needs your login, IMPORTHTML and IMPORTXML will not get it. Two ways that work:
-
The site's own Export or Download CSV button. A public CSV
address can be pulled into Sheets with
=IMPORTDATA("address"). - Read the page in your browser. NeatCells sees what you see, after the page's scripts have run and with your login: click its icon, then Copy and paste into Sheets, or download CSV and use File › Import.
Questions
Why did IMPORTHTML work yesterday and not today?
The site changed its page, began building the table with scripts, or started refusing Google's servers. Check the source again; a changed table number is the easiest fix.
Does IMPORTHTML work on pages built with JavaScript?
No. It reads the HTML the site sends and does not run scripts, so tables filled in by JavaScript come back empty. IMPORTXML has the same limit.
How often does IMPORTHTML refresh?
Google recalculates import functions about once an hour. Editing the formula fetches the page again at once.