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.
A CSV published on the web, dropped straight into the sheet:
=IMPORTDATA("https://example.com/exports/orders.csv")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.
IMPORTDATA errors
What they mean — and the fixes.
#N/AThe URL didn't return CSV or TSV, or it's larger than Sheets allows — check it opens as plain text in a browser.
Related functions
More ways Google Sheets gets this done.
- ENCODEURLEncodes a string of text for the purpose of using in a URL query. .WebExcel
- HYPERLINKCreates a hyperlink inside a cell.WebExcel
- IMPORTFEEDImports a RSS or ATOM feed.WebNo Excel equivalent
- IMPORTHTMLImports data from a table or list within an HTML page.WebNo Excel equivalent
- IMPORTRANGEImports a range of cells from a specified spreadsheet.WebNo Excel equivalent
- IMPORTXMLImports data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds.WebNo Excel equivalent