IMPORTDATA function

Imports delimited data from a URL and returns it as a range of cells in your spreadsheet, parsing content automatically for immediate use.

=IMPORTDATA(url, [delimiter])

Generate a IMPORTDATA formula

Describe what you need. The generator will reach for IMPORTDATA where IMPORTDATA is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How IMPORTDATA reads its arguments
urlrequireddelimiteroptionalIMPORTDATA
ArgumentRequiredDescription
urlRequiredThe URL pointing to the data file (typically CSV). Must return valid delimited data; returns #N/A if the URL is unreachable, returns a 404, or the server is unavailable.
delimiterOptionalA single character that separates columns in the imported data. If omitted, assumes comma (,) as the default. Must be a single character; returns #VALUE! if passed multiple characters or an invalid type.

Returns

A two-dimensional array of text values parsed from the imported file.

Availability

Excel: Not available · Google Sheets: Supported

Worked examples

1. Import an employee roster from a public CSV URL

IDNameDepartmentHire DateSalaryStatus
1001Alice JohnsonSales2020-03-1575000Active
1002Bob SmithEngineering2019-07-2295000Active
1003Carol WilliamsMarketing2021-01-1068000Active
=IMPORTDATA("https://example.com/employees.csv")

Result: A range containing all columns (ID, Name, Department, Hire Date, Salary, Status) for each employee.

IMPORTDATA fetches the CSV file from the URL and automatically parses it using the default comma delimiter. Each row and column is preserved as it appears in the source file, making the data immediately available for analysis or reference.

2. Import tab-separated employee data with custom delimiter

IDNameDepartmentHire DateSalaryStatus
1001Alice JohnsonSales2020-03-1575000Active
1002Bob SmithEngineering2019-07-2295000Active
1004David BrownSales2022-05-0872000On Leave
=IMPORTDATA("https://example.com/employees.tsv",CHAR(9))

Result: A range with columns correctly separated by tabs instead of commas.

When the source file uses tabs as delimiters, IMPORTDATA uses CHAR(9) (the tab character) as the second argument. This correctly splits each row into separate columns, preserving the original data structure even when the delimiter differs from the default comma.

3. Import employee data and filter for active staff in one formula

1001Alice JohnsonSales2020-03-1575000Active
1002Bob SmithEngineering2019-07-2295000Active
1003Carol WilliamsMarketing2021-01-1068000Active
1005Eve DavisEngineering2018-11-30105000Active
=QUERY(IMPORTDATA("https://example.com/employees.csv"),"SELECT * WHERE Col6 = 'Active'")

Result: Only rows where the Status column (column 6) equals 'Active'; employees on leave are excluded.

IMPORTDATA retrieves all employee records, and QUERY applies a SQL-like filter to select only rows where Status equals 'Active'. This approach combines import and transformation in a single formula, keeping your sheet dynamic without requiring helper columns.

Common errors

Which IMPORTDATA error are you seeing?
IMPORTDATA returned an error#N/A
Verify the URL is correct and the file exists. Test the URL directly in a browser. Confirm the server and network are accessible.
#VALUE!
Ensure the delimiter is a single character enclosed in quotes, such as "," for comma or CHAR(9) for tab. Do not pass empty strings or multi-character values.
#N/A
Verify the source file contains properly formatted delimited data. If using a custom delimiter, confirm the actual file uses that delimiter and isn't corrupted.
ErrorWhy it happensHow to fix it
#N/AThe URL is unreachable, returns a 404 error, the server is offline, or the connection times out.Verify the URL is correct and the file exists. Test the URL directly in a browser. Confirm the server and network are accessible.
#VALUE!The delimiter argument is not a single character (e.g., you passed multiple characters, a number, or an invalid type).Ensure the delimiter is a single character enclosed in quotes, such as "," for comma or CHAR(9) for tab. Do not pass empty strings or multi-character values.
#N/AThe imported file is empty, contains no parseable data, or the data format doesn't match the specified delimiter.Verify the source file contains properly formatted delimited data. If using a custom delimiter, confirm the actual file uses that delimiter and isn't corrupted.

Tips and when to use something else

  • Use IMPORTDATA for static CSV URLs; for live data from Google Sheets, use IMPORTRANGE instead—it's more efficient and handles Sheet-specific features.
  • IMPORTDATA recalculates when your sheet recalculates (usually on edit), so large files may cause performance lag. Consider importing periodically rather than on every sheet open.
  • Combine IMPORTDATA with QUERY or FILTER to transform imported data in a single formula, avoiding helper columns and keeping your sheet cleaner.
  • Test your URL in a browser first to confirm it returns the expected data format and delimiter before debugging #N/A errors in your formula.

Frequently asked questions

Can IMPORTDATA import data from a Google Sheets URL?
No. IMPORTDATA is designed for delimited files like CSV and TSV. For Google Sheets, use IMPORTRANGE instead. However, if you export a Google Sheet as CSV and use that exported URL, IMPORTDATA will work.
How do I import data with delimiters other than commas, like semicolons or tabs?
Use the second argument: =IMPORTDATA(url, ";") for semicolons or =IMPORTDATA(url, CHAR(9)) for tabs. The delimiter must be a single character string.
Does IMPORTDATA automatically refresh when the source file changes?
Yes. IMPORTDATA recalculates whenever your sheet recalculates (triggered by edits or manual refresh). For frequently changing data, this updates automatically, though very large files may recalculate slower.
What's the difference between IMPORTDATA and IMPORTHTML?
IMPORTDATA imports delimited data (CSV, TSV) from URLs. IMPORTHTML extracts structured data from HTML tables or lists on web pages. Use IMPORTDATA for data files and IMPORTHTML for web page content.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17