IMPORTDATA in Google Sheets: Import CSV and TSV Tables
Import a public CSV or TSV with IMPORTDATA in Google Sheets, reproduce Census source checks and understand headers, refresh behavior and external-access limits.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: put a direct CSV URL in Setup!A1 and enter =IMPORTDATA(Setup!A1) in A1 of an empty Raw tab. The expected result is the source’s rows and columns, including any header row already present in the file.
Syntax and the input URL
=IMPORTDATA(url)
The Google IMPORTDATA reference documents one required argument: the URL of CSV or TSV data, including its protocol. Quote a literal URL or refer to a cell containing it.
There is no documented delimiter, header-count or selected-column argument. CSV uses comma-separated fields; TSV uses tab-separated fields. An ordinary HTML download page is not the same input as the underlying data file.
Because the function imports a table, keep the destination area clear and separate your source URL and downstream analysis from the cells the result needs. In this example the URL is kept on a different tab to avoid colliding with a wide import.
Worked example: Google’s Census CSV source
Create tabs named Setup and Raw. Put this URL in Setup!A1:
https://www2.census.gov/programs-surveys/popest/datasets/2010-2019/national/totals/nst-est2019-popchg2010_2019.csv
In Raw!A1, enter:
=IMPORTDATA(Setup!A1)
This is the Census file used by Google’s official example. An independent retrieval on October 17, 2026 contained 58 rows including the header and 67 columns, so the expected occupied rectangle for that snapshot is A1:BO58.
Selected checks for an import beginning at A1 are:
| Cell | Expected content from the retrieved source |
|---|---|
| A1 | SUMLEV |
| E1 | NAME |
| P1 | POPESTIMATE2019 |
| E2 | United States |
| G2 | 309321666 |
| P2 | 328239523 |
The Census CSV and Google’s linked published result agree on these substantive fields. Leading-zero geographic codes can be interpreted as numbers by a spreadsheet; this guide does not promise preservation of those codes as text.
Independent calculation from the imported values
On a separate analysis tab, calculate:
=Raw!P2-Raw!G2
Expected result for this snapshot: 18,917,857, the difference between the file’s 2019 and 2010 United States population estimates.
These are historical estimates from this particular vintage, not current population totals. Keeping the original column headings and file name beside a derived result prevents an old dataset from being mistaken for today’s value.
The numerical difference was independently calculated from parsed CSV fields. It was not obtained by running IMPORTDATA in Sheets.
Advanced application: avoid double-counting geographic levels
The file contains the national total, regions and states. Summing every population row would count overlapping geographic groups repeatedly.
For the four regional rows, whose names appear in E3:E6, use:
=SUM(Raw!P3:P6)
Expected result: 328,239,523, matching Raw!P2. The independent source parser confirms those four rows are Northeast, Midwest, South and West.
As a structural check, you can compare:
=SUM(Raw!P3:P6)-Raw!P2
Expected result: 0. This validates the selected aggregation for this file layout; it does not prove that an arbitrary import contains every record or that future source layouts will keep the same row positions.
For a recurring report, inspect the headers and geography labels before reusing fixed row numbers. Keep one import and reference its cells rather than issuing a separate external fetch for every calculation.
Refresh behavior and access
Google’s import-function guidance says IMPORTDATA checks for updates hourly while the document is open. Reloading the document is not itself a guaranteed refresh trigger. Deleting and re-entering or overwriting the formula can trigger a reload, but repeated changes may create unnecessary traffic.
Google applies usage limits across documents created by the same user; a collaborator’s edits can contribute. The reference does not supply a universal requests-per-minute allowance, so no numeric quota is assumed here.
An editor may need to authorize external-data access. Administrators can also block particular sources. Treat an access error as a permission issue to resolve with the appropriate owner or administrator, rather than disguising the request or trying to circumvent the restriction.
Errors and limitations
Check that the URL serves actual CSV or TSV, that the source is reachable and that the output area has room. Compare the raw file’s headers before blaming a downstream formula for a shifted column.
Direct or indirect volatile dependencies such as NOW or RAND are restricted for imports; Google documents TODAY as an exception. Adding a changing random parameter is not a supported way to force constant refreshes.
A text export does not carry workbook formatting, formulas or charts as a native spreadsheet would. Exact coercion of every field type, all encoding cases and all error tokens were not established.
Availability and verification
IMPORTDATA is currently documented in rolling Google Sheets. Original introduction date and first or last functioning numbered releases were not established.
NOT_TESTED_IN_GOOGLE_SHEETS. Individual Google guidance, its public example and the actual Census CSV were inspected on October 17, 2026. CSV dimensions, selected fields and aggregation arithmetic were independently verified. No external-access permission or native import was performed.