Skip to content
Google Sheets

IMPORTDATA function in Google Sheets

Imports data at a given url in .csv (comma-separated value) or .tsv (tab-separated value) format.

=IMPORTDATA(url)

IMPORTDATA syntax and parameters

One argument, one required.

  • urlstringRequired

    The url from which to fetch the .csv or .tsv-formatted data, including protocol (e.g. http://). The value for url must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.

IMPORTDATA examples

Formulas you'll actually reuse.

  1. A CSV published on the web, dropped straight into the sheet:

    =IMPORTDATA("https://example.com/exports/orders.csv")
  2. Filter the imported CSV without a helper sheet:

    =QUERY(IMPORTDATA("https://example.com/exports/orders.csv"), "select Col1, Col4 where Col4 > 1000")

IMPORTDATA in Excel

No direct equivalent — here's the way around.

Try IMPORTDATA in the playground

Edit the example — nothing to install.

Preloaded with the IMPORTDATA formula from Example 1 — change anything and watch it respond.

Loading the editor…

IMPORTDATA errors

What they mean — and the fixes.

  • #N/A

    The URL didn't return CSV or TSV, or it's larger than Sheets allows — check it opens as plain text in a browser.