Skip to main content
SheetCraft
🌐 Web & Import Function · intermediate

IMPORTDATA Function in Google Sheets

Imports a CSV or TSV file from a URL. Simpler than IMPORTHTML for already-structured data.

Syntax

IMPORTDATA(url, [delimiter], [locale])

Returns: A spilled array of the file's rows.

Excel equivalent: Power Query 'From CSV' equivalent.

Parameters

NameRequiredDescription
urlRequiredURL pointing to a CSV or TSV file.
delimiterOptionalOverride delimiter. Default comma; pass "\t" for TSV.
localeOptionalLocale for number/date parsing.

Examples

Pull a public CSV

=IMPORTDATA("https://example.com/data.csv")

Imports the CSV. Refreshes hourly.

TSV import

=IMPORTDATA(A1, "\t")

URL in A1, tab delimiter.

Wrap with QUERY

=QUERY(IMPORTDATA(A1), "SELECT Col1, Col3 WHERE Col5 > 100", 1)

Pull and filter in one formula.

When to use an alternative

  • IMPORTHTMLHTML table on a page.
  • IMPORTXMLXML or specific element.
  • Apps Script + UrlFetchAppAuthentication needed.

Common errors and how to fix them

  • #N/A

    Cause: URL inaccessible or non-CSV.

    Fix: Test the URL in a browser.

  • Wrong columns

    Cause: Delimiter mismatch.

    Fix: Pass correct delimiter.

Related functions

Frequently Asked Questions

Max size?

Around 50MB / 10M cells. Larger: Connected Sheets or Apps Script.

Protected URLs?

No — fetches anonymously. Use Apps Script for authenticated sources.

Source: Google Sheets official function reference.