What is IMPORTDATA in Google Sheets?
IMPORTDATA retrieves a text file from a web address and parses it into sheet cells. It works with comma- or tab-separated values published at a stable URL. Government open data, published exports, and simple report endpoints are common sources.
When to use it
Use IMPORTDATA when a system publishes CSV or TSV at a public link and you want a live grid without manual downloads.
When to skip it
Skip IMPORTDATA for JSON APIs, authenticated feeds, or files that change column order without notice. IMPORTRANGE or a script may be safer.
How it works
-
1
Confirm the URL returns raw CSV or TSV in the browser, not an HTML wrapper page.
-
2
Enter =IMPORTDATA("https://example.com/data.csv") in the destination cell.
-
3
Leave space below and to the right for the parsed table to spill.
-
4
Add QUERY or ARRAYFORMULA cleanup if the file includes quote characters or blank trailer rows.
-
5
Publish your own CSV from another sheet with File > Share > Publish to web when you control the source.
-
6
Monitor for #REF! or parse errors when the publisher changes delimiter or encoding.
Examples in Google Sheets
Open data feed
=IMPORTDATA("https://data.city.gov/export.csv") loads a municipal dataset for local analysis.
Published sheet export
=IMPORTDATA(published_csv_url) mirrors a partner tab they expose via Publish to web as CSV.
TSV log file
=IMPORTDATA(log_url) imports tab-separated events when the server serves text/plain TSV.
Better Sheets resources
Common mistakes
-
Pointing at a Google Sheet view URL instead of a published CSV export link.
-
Building payroll logic on a feed that adds columns without versioning.
-
Ignoring charset issues when accented characters import as mojibake.
-
Stacking many IMPORTDATA calls on one recalc-heavy dashboard tab.
-
Assuming IMPORTDATA bypasses robots.txt or paywalls on private hosts.
Frequently asked questions
- IMPORTDATA vs IMPORTRANGE?
- IMPORTDATA reads CSV or TSV URLs. IMPORTRANGE links another Google spreadsheet by ID.
- Can IMPORTDATA read JSON?
- No. Use Apps Script or a third-party connector for JSON endpoints.
- Why #REF! on IMPORTDATA?
- The URL may be down, blocked, or returning HTML error pages instead of CSV.
- Does IMPORTDATA detect delimiter?
- Google parses common comma and tab formats. Odd separators may need manual SPLIT cleanup.
- Can I filter IMPORTDATA?
- Yes. Wrap with QUERY or FILTER on the spilled range.
- IMPORTDATA and large files?
- Very large files may time out or slow the sheet. Consider scheduled imports via script.
- How often does it update?
- On recalc with Google fetch limits, similar to other import functions.
Related Tutorials
Watch how IMPORTDATA works
How to Download a Sheet as a CSV with a URL only
How Do I Make a CSV File? And give a link to someone instead of the csv.
Related blog posts
Guides that explain IMPORTDATA in more depth.
What's Better Than Google Sheets?
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Quick Google Sheets Tips
Boost productivity and streamline your workflow in Google Sheets with our quick tips and free tools. Breathe new life into your spreadsheets today.
Read post →Related terms
IMPORTRANGE
IMPORTRANGE loads values from a range in another Google spreadsheet into your current file. You pass the spreadsheet URL or key plus a range string with an optional sheet name. After you grant access once, the link stays live and updates when the source changes.
Read guide →IMPORTXML
IMPORTXML fetches a URL and returns data matching an XPath query. You can scrape page titles, meta tags, table cells, or RSS-style XML fields. It is more precise than IMPORTHTML when you need one value or a repeating node set from structured markup.
Read guide →IMPORTFEED
IMPORTFEED reads an RSS or Atom syndication URL and returns feed items in a table. You can request specific fields like titles, URLs, authors, or dates using query parameters. It is handy for lightweight media monitoring without a dedicated news tool.
Read guide →IMPORTHTML
IMPORTHTML fetches a public web page and returns a table or list from its HTML. You provide the URL, the query type (table or list), and the index of which table or list on the page to import. It is a quick scraper for simple pages without writing Apps Script.
Read guide →Done reading about IMPORTDATA?
Membership unlocks 600+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.