Skip to content
Google Sheets IMPORT functions reference

Google Sheets import errors, explained one by one

15documented messages
6categories

Last verified

Google Sheets has five functions that pull data from outside the spreadsheet: IMPORTXML and IMPORTHTML read web pages, IMPORTDATA reads CSV and TSV files, IMPORTFEED reads RSS and Atom feeds, and IMPORTRANGE reads another Google spreadsheet. When they fail, the cell shows #N/A, #REF! or #ERROR!, and the real explanation is in the tooltip you get by hovering over the cell. That tooltip text is what each entry below is named after.

The first four functions fetch URLs from Google's servers, not from your browser. They do not carry your cookies, they do not run JavaScript, and the target site sees a request from Google's infrastructure. That single fact explains most of these errors: a page that loads perfectly for you can be blocked, empty or different for Sheets. IMPORTRANGE is different; its errors are mostly about permissions between two spreadsheets and the size of the range.

Read the message in stages. Errors such as Could not fetch url and Resource at url not found mean the request itself failed. Imported content is empty and Imported Xml content can not be parsed mean the request worked but the selection or parsing did not. Result too large, the size limits and Loading... are about volume, and Google enforces import usage limits against the creator of the spreadsheet across every file they own. The IMPORTRANGE messages are about access and range addresses.

Each entry stands alone, quotes the message as Sheets shows it, and gives ordered steps to fix it. For a longer walkthrough of the two most common IMPORTXML errors, see IMPORTXML "Could not fetch url" and "Imported content is empty".

Official reference: Google Docs Editors Help - Learn more about Import functions

How to read a Google Sheets error

Hover over the cell to see the message. The error type is shown in the cell; the explanation is in the tooltip:

A1: =IMPORTXML("https://example.com/products", "//div[@class='price']")

#N/A
Error
Imported content is empty.

For IMPORTRANGE the same pattern applies, usually with #REF!:

A1: =IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbC...xyz", "Orders!A1:F500")

#REF!
You need to connect these sheets.
[Allow access]

All 15 messages

Jump to: Fetching the URL (2) · Parsing and selecting content (2) · Size limits (2) · Usage limits and loading (1) · Permissions and access (5) · Formula and range problems (3)

Fetching the URL

MessageHTTPType
Could not fetch urlCould not fetch url: https://example.com/page—Retryable
Resource at url not foundResource at url not found: https://example.com/data.csv404Permanent - do not retry

Parsing and selecting content

MessageHTTPType
Imported content is emptyImported content is empty.—Configuration
Imported Xml content can not be parsedImported Xml content can not be parsed.—Configuration

Size limits

MessageHTTPType
Resource at url contents exceeded maximum sizeResource at url contents exceeded maximum size.—Permanent - do not retry
Result too large—Configuration

Usage limits and loading

MessageHTTPType
Loading... / Loading data may take a whileError Loading data may take a while because of the large number of requests. Try to reduce the amount of IMPORTHTML, IMPORTDATA,…—Retryable

Permissions and access

MessageHTTPType
You need to connect these sheets#REF! You need to connect these sheets. Allow access—Configuration
You don't have permissions to access that sheet#REF! You don't have permissions to access that sheet.403Configuration
Import Range internal error#REF! Import Range internal error.—Retryable
Admin has not allowed imports from this URLAdmin has not allowed imports from ...—Policy / account
Some formulas are trying to send and receive data from external partiesWarning: Some formulas are trying to send and receive data from external parties.—Configuration

Formula and range problems

MessageHTTPType
Cannot find range or sheet for imported range#REF! Cannot find range or sheet for imported range.—Configuration
Array result was not expanded because it would overwrite data#REF! Array result was not expanded because it would overwrite data in B5.—Configuration
Not allowed to reference a cell with NOW or RANDError: This function is not allowed to reference a cell with NOW(), RAND(), RANDARRAY(), or RANDBETWEEN()—Policy / account

Definitions

Google Sheets guides, limits and tools

Other error directories

Frequently asked questions

Why does IMPORTXML work in my browser but not in Google Sheets?

Because Sheets does not use your browser. Google fetches the URL from its own servers, without your cookies or login, and without running JavaScript. Sites that block automated or data-center traffic, require a session, or build content with JavaScript will look different to IMPORTXML than they do to you. Check the page with View Page Source in an incognito window to see roughly what Sheets receives.

How often do IMPORTXML, IMPORTHTML and IMPORTDATA refresh?

Google says these functions check for updates every hour while the document is open. Deleting and re-adding the formula, or overwriting it with the same formula, triggers a refresh. Simply reloading the browser tab does not. IMPORTRANGE also checks hourly and reloads when the file is opened, and any edit to the source spreadsheet refreshes open receiving files.

Is there a limit on how many IMPORTXML formulas I can use?

Google does not publish a number. Its help page says import functions have strict usage limits enforced on the creator of the document, counted across all spreadsheets they created, and that heavy use produces the 'Loading data may take a while because of the large number of requests' error. In practice, hundreds of live import formulas in one account is where people start seeing cells stuck on Loading.

Can IMPORTXML scrape pages that use JavaScript?

No. IMPORTXML and IMPORTHTML read the HTML the server returns and do not execute scripts. If the value you want is inserted by JavaScript after the page loads, the formula returns 'Imported content is empty'. Sometimes the same data exists in a JSON block inside a script tag or in a separate JSON endpoint, but scraping the rendered page requires a real browser.

Can IMPORTXML read pages behind a login?

No. Import functions send anonymous requests with no cookies or credentials, so any page that requires a session will return a login page, a not-found response or a fetch error. Use the service's official API or export feature, or a tool that can operate an authenticated browser session, for data behind a login.

How much data can IMPORTRANGE transfer?

Google's IMPORTRANGE help page says it is capped at 10MB of received data per request. Large or text-heavy ranges can return 'Result too large' before that sounds plausible from the row count. Bound the range, remove unneeded columns, or split it into several imports stacked with VSTACK.

Why do my import formulas show a warning banner about external parties?

Since Google added external-data protection, the first import or IMAGE formula in a spreadsheet triggers a banner and stays blocked until an editor clicks Allow access. Viewers cannot approve it. Google notes that access cannot be revoked once accepted, except by restoring a previous version of the file.

Why can't import functions use NOW() or RAND() to force a refresh?

Google blocks import functions from referencing NOW, RAND, RANDARRAY or RANDBETWEEN because those change on every recalculation and would force constant external requests. TODAY is allowed because it changes at most once a day. To refresh on demand, change a plain value in a cell the URL references.

When an IMPORT formula cannot read the page

IMPORTXML and IMPORTHTML only see the HTML the server sends. An Autonoly extraction step reads the page in a real browser and writes rows to Google Sheets. Sites that block automated visitors can still block it.