---
title: "IMPORTDATA in Google Sheets: import a CSV from a URL"
canonical: "https://www.owox.com/blog/articles/importdata-google-sheets"
updated: "2026-10-05"
---

# IMPORTDATA function in Google Sheets: import a CSV or TSV file from a URL

IMPORTDATA loads a CSV or TSV file from a public URL into a Google Sheet and keeps it refreshed. This guide covers the syntax, how to keep only some columns or rows with QUERY, how often the data updates, what the function cannot read, such as files in Google Drive or behind a login, and the errors it returns.

[Google Sheets Tips](/blog/topics/google-sheets-tips) · Updated October 2, 2026 · [Vadym Kramarenko](/team/vadym-kramarenko) · 8 min read

![IMPORTDATA function in Google Sheets: import a CSV or TSV file from a URL](https://cdn.owox.ai/www/webflow/69f0a3691dc47ae741b25acd_USE-THE-IMPORTDATA-FUNCTION.png/public)

IMPORTDATA loads a CSV or TSV file from a URL into the sheet:

> `=IMPORTDATA("https://api.slingacademy.com/v1/sample-data/files/marketing-campaigns.csv")`

The file is fetched, split into columns and rows, and written from the cell with the formula downwards and to the right.

![Google Sheets with an IMPORTDATA formula in B3 and the imported CSV of marketing campaigns below it: campaign name, start and end date, budget, ROI, type, target audience, channel and conversion rate](https://cdn.owox.ai/www/webflow/67882365f1d1959bfdfd07c0_54553.png/public)

## IMPORTDATA syntax

> `=IMPORTDATA(url, [delimiter], [locale])`

*   **url:** the address of the file, with its protocol (https://). In quotation marks, or a reference to a cell that holds it.
*   **delimiter:** optional. The character that separates the values, for files that use something other than a comma or a tab.
*   **locale:** optional. A language and region code, such as “en\_US”, that decides how numbers and dates in the file are read.

![Google Sheets with =IMPORTDATA( typed in a cell and the function hint showing url, delimiter and locale and an example with a comma and en\_US as the second and third arguments](https://cdn.owox.ai/www/webflow/67882365c3166c7a7981d158_54547.png/public)

The hint inside Sheets shows the three arguments. Google’s help page for the function documents only the url (checked in October 2026). We tested the other two: with “;” as the delimiter, a comma-separated file of ten columns arrived as one column, and the call with “,” and “en\_US” returned all ten. Both arguments work.

With the address in a cell, `=IMPORTDATA(A2)` makes it easy to switch files.

### The first time: allow access

The first time IMPORTXML, IMPORTHTML, IMPORTDATA or IMPORTFEED is used in a file, Sheets shows a warning bar above the grid, “Some formulas are trying to send and receive data from external parties”, and the formula shows #REF! until **Allow access** is clicked in that bar. We saw exactly this in our test file.

![Google Sheets with the yellow warning bar Some formulas are trying to send and receive data from external parties above the grid and #REF! in the cell that holds the import formula](https://cdn.owox.ai/www/content-marketing-article/importdata-google-sheets/screens/2.png/public)

According to [Google’s help](https://support.google.com/docs/answer/12188454), the bar appears once per spreadsheet, only an editor of the file can click it, and on a phone it has to be done in a desktop browser.

## Keep only some columns or rows

IMPORTDATA returns the whole file. Wrap it in [QUERY](/blog/articles/query-function-google-sheets) to keep a part. The result of IMPORTDATA is an array, not a range, so the columns are called Col1, Col2 and so on instead of A, B.

### Selected columns

> `=QUERY(IMPORTDATA("https://api.slingacademy.com/v1/sample-data/files/student-scores.csv"), "select Col1, Col2")`

![Google Sheets with a QUERY formula around IMPORTDATA and select Col1, Col2, returning only the id and first\_name columns of a student scores CSV](https://cdn.owox.ai/www/webflow/678823662afd968415247bfa_54561.png/public)

### The first rows

> `=QUERY(IMPORTDATA("https://api.slingacademy.com/v1/sample-data/files/customers.csv"), "select * limit 10")`

![Google Sheets with a QUERY formula around IMPORTDATA and select \* limit 10, returning the header and the first rows of a customers CSV](https://cdn.owox.ai/www/webflow/6788236642a1e408e6c0e30d_54557.png/public)

### Rows that meet a condition

With the address of the student scores file in A2:

> `=QUERY(IMPORTDATA(A2), "select Col1, Col2, Col5 where Col5 = 'female'", 1)`

In that file the fifth column is the gender. Text values go in single quotes, numbers without quotes, and the last argument, 1, says that the first row is a header. The other clauses of QUERY, such as `order by` and `group by`, work the same way.

### One value from the file

[INDEX](/blog/articles/index-and-match-google-sheets) takes a single cell of the imported array by its row and column:

> `=INDEX(IMPORTDATA(A2), 2, 3)`

## The Turning Point

OWOX Data Marts

See your first report built in real time. _15 minutes._

1.  Connect your data warehouse
2.  Pick your metrics
3.  Get a live Google Sheets report

In the time it takes to write a ticket. Then imagine never writing that ticket again.

[Book a Demo](/book-a-call)

We'll use your actual use case

## What arrives in the cells

*   **Numbers and dates are converted.** In the first screenshot of this guide, the start and end dates of the campaigns arrived as serial numbers such as 45017. Select the column and apply **Format > Number > Date**.
*   **The result is one block.** It belongs to the formula. Typing into any cell of the block makes the formula return #REF!, and the imported cells cannot be edited one by one.
*   **Formatting is yours.** The file carries no fonts or colors; format the cells of the sheet.

To keep a snapshot that no longer changes, copy the block and use **Edit > Paste special > Values only** in another place.

## How often the data refreshes

IMPORTDATA re-reads the file by itself. Google’s [help](https://support.google.com/docs/answer/12188454) says that IMPORTDATA, IMPORTHTML and IMPORTXML check for updates every hour while the spreadsheet is open. Reloading the page does not trigger a refresh; deleting the formula and entering it again does.

## What IMPORTDATA cannot do

*   **Private files.** The request comes from Google’s servers, not from your browser. A URL that needs a login, a cookie or a key sent with the request cannot be read.
*   **A Google Drive sharing link.** A sharing link opens a viewer page, not the file, and the formula returns an error:

![Google Sheets with an IMPORTDATA formula on a Google Drive sharing link returning #N/A with the message Could not fetch url](https://cdn.owox.ai/www/webflow/6788236665e7ec52d0f59f54_54571.png/public)

*   **Other formats.** Excel files, JSON and PDFs are not CSV. For a table on a web page use [IMPORTHTML](/blog/articles/importhtml-function-google-sheets), for XML and page elements [IMPORTXML](/blog/articles/importxml-function-google-sheets).
*   **Many imports at once.** Import requests are throttled per creator of the file; see the errors below.

For data that lives in another Google Sheet, use [IMPORTRANGE](/blog/articles/importrange-google-sheets): it reads the range directly and works with your access rights.

## The import functions compared

| Function | Imports |
| --- | --- |
| IMPORTDATA | A CSV or TSV file from a URL |
| [IMPORTRANGE](/blog/articles/importrange-google-sheets) | A range from another Google spreadsheet |
| [IMPORTHTML](/blog/articles/importhtml-function-google-sheets) | A table or a list from a web page |
| [IMPORTXML](/blog/articles/importxml-function-google-sheets) | Elements of a page or XML file, chosen by XPath |
| [IMPORTFEED](/blog/articles/importfeed-function-google-sheets) | An RSS or Atom feed |

## Errors in IMPORTDATA

**⚠️ Error:** #N/A with “Resource at url not found”.

✅ **Solution:** The address is wrong or the file was moved. Open the URL in a browser: it should download or display the raw file.

![Google Sheets with an IMPORTDATA formula on a non-existent file returning #N/A with the message Resource at url not found](https://cdn.owox.ai/www/webflow/678823660c870f0a77931d1d_54569.png/public)

**⚠️ Error:** #N/A with “Could not fetch url”.

✅ **Solution:** The request did not get through: the address lacks its protocol, the file is private, or the site blocks automated requests.

**⚠️ Error:** #REF! with “Array result was not expanded”.

✅ **Solution:** The cells the result needs are not empty. Clear the area below and to the right of the formula.

**⚠️ Error:** An error right after entering the formula, with a warning bar above the sheet.

✅ **Solution:** The file has not been allowed to fetch external data yet. Allow access in the warning bar.

**⚠️ Problem:** Everything arrives in one column.

✅ **Solution:** The file uses another separator, often a semicolon. Give it as the second argument, `=IMPORTDATA(A2, ";")`, or split the column with [SPLIT](/blog/articles/how-to-split-cells-in-google-sheets).

**⚠️ Problem:** Numbers arrive as text, or decimals are wrong.

✅ **Solution:** The file uses another number format than the spreadsheet, for example a decimal comma. Set the locale in the third argument, or change the locale of the spreadsheet under File > Settings.

**⚠️ Error:** “Loading…” with the note “Loading data may take a while because of the large number of requests”.

✅ **Solution:** Too many import requests. Google counts them per creator of the file, across all the files that person has open, so the fix is fewer import formulas, not a faster connection. Replace finished results with values.

**⚠️ Error:** #ERROR! with “This function is not allowed to reference a cell with NOW(), RAND(), RANDARRAY(), or RANDBETWEEN()”.

✅ **Solution:** An import function cannot depend on a volatile function, directly or through another cell, which rules out the trick of adding NOW() to the address to force a refresh. TODAY is the one exception.

## Related guides

*   [IMPORTRANGE](/blog/articles/importrange-google-sheets): Data from another spreadsheet.
*   [IMPORTHTML](/blog/articles/importhtml-function-google-sheets): Tables and lists from web pages.
*   [IMPORTXML](/blog/articles/importxml-function-google-sheets): Page elements by XPath.
*   [IMPORTFEED](/blog/articles/importfeed-function-google-sheets): RSS and Atom feeds.
*   [QUERY](/blog/articles/query-function-google-sheets): Filter, sort and group what was imported.
*   [QUERY with IMPORTRANGE](/blog/articles/query-with-importrange-google-sheets): The same pattern for spreadsheets.

## A CSV link is a fragile source for a report

IMPORTDATA works as long as someone keeps a public file at the same address in the same layout. Business data rarely lives in public files: it is in ad platforms, a CRM and a warehouse, behind a login, and exports of it get stale the day they are made. A moved file turns the import into #N/A, and a column added or reordered in the file shifts Col1 and Col2 under your formulas without any error.

The [OWOX Data Marts extension for Google Sheets](https://workspace.google.com/marketplace/app/owox_data_marts/94902851409) covers that half. A data analyst publishes a data mart (a table or an SQL query in your data warehouse) and makes it available for reports. In Sheets you open the extension, pick the data mart, tick the columns you want and run it. The rows land in a tab, ready for your formulas.

![Google Sheets with the OWOX Data Marts extension open beside an ad spend table: the Unified Ad Spend data mart, nine of fourteen columns ticked and a Save & Run button – the rows in the sheet come from a governed data mart, not a pasted export](https://cdn.owox.ai/www/content-marketing-article/importdata-google-sheets/screens/1.png/public)

What changes for the person who maintains the sheet:

*   **Refresh replaces re-export.** _Refresh current report_ in the extension menu re-runs the same pull, and a scheduled refresh keeps the tab current without anyone touching it.
*   **The source is written on the sheet.** The header cell of an imported tab carries a note with the data mart it came from, the time of the import and a link to the report.
*   **No SQL and no warehouse access needed.** The analyst decides which data marts and columns are available. You choose from that list.

The extension does not write or change the analyst’s SQL. IMPORTDATA stays the right tool for what it was made for: a public file that someone else publishes. The extension comes with the OWOX Cloud plans of [OWOX Data Marts](https://www.owox.com/app-signup); [spreadsheet reporting](/features/spreadsheet-reporting) describes both ways data reaches a sheet.

## Your New Normal

Turn your data into decisions.

Governed data marts give you the clean foundation ML needs to actually work.

*   No AI hallucinations
*   Analyst-governed definitions
*   Every number traces to SQL

[Get started free](https://www.owox.com/app-signup)

## FAQ

## Frequently Asked Questions

What is the formula for IMPORTDATA?

The formula is =IMPORTDATA(url), where url is the address of a CSV or TSV file in quotation marks or a reference to a cell that holds it. The function hint in Sheets also shows two optional arguments, a delimiter and a locale.

What is the limit of IMPORTDATA in Google Sheets?

Google's help page for IMPORTDATA does not state a fixed number of formulas per spreadsheet. The practical limits are these: the URL has to be public, the file has to be CSV or TSV, a very large file loads slowly or fails, and the data refreshes about once an hour.

How does IMPORTDATA work in Google Sheets?

IMPORTDATA function in Google Sheets grabs data from a specified web URL, importing it directly into your spreadsheet. It's ideal for CSV or TSV file formats, allowing you to easily include external data in your analysis without manual data entry.

What is the difference between IMPORTRANGE and IMPORTDATA in Google Sheets?

IMPORTRANGE allows you to bring data from one Google Sheet into another, while IMPORTDATA is used to import data from a web URL, typically in CSV or TSV format. IMPORTRANGE is for sheet-to-sheet data transfer, and IMPORTDATA fetches data from the web.

## Who wrote this

![Vadym Kramarenko](https://cdn.owox.ai/www/webflow/6798e703afdf787334941cde_Vadym-Kramarenko.png/public)

[Vadym Kramarenko](/team/vadym-kramarenko) · Growth Marketing Manager

Vadym Kramarenko is a Growth Marketing Manager at OWOX, where he drives user acquisition and product-led growth strategies. He hosts the OWOX podcast, interviewing analytics professionals about data-driven marketing, attribution, and reporting best practices. Vadym specializes in turning complex analytics concepts into practical, actionable marketing frameworks.

[LinkedIn](https://www.linkedin.com/in/vadim-kramarenko/) · [All articles](/team/vadym-kramarenko)

[Google Sheets Tips](/blog/topics/google-sheets-tips)

## Related articles

[Google Sheets Tips · Pivot tables in Google Sheets: how to create and use them · October 2, 2026](/blog/articles/pivot-tables-google-sheets)

[Google Sheets Tips · FILTER function in Google Sheets: formula and examples · October 2, 2026](/blog/articles/google-sheets-filter-function)

[Google Sheets Tips · XLOOKUP vs VLOOKUP in Google Sheets: the key differences · October 2, 2026](/blog/articles/key-differences-of-xlookup-vs-vlookup)

[See all articles →](/blog/articles)

## Book a call

You are booked. The invitation is on its way to , with the calendar invite and the meeting link.

[Reschedule](#)

[Cancel](#)

## Links

Pages this page links to, on this site and on docs.owox.com. Where the page has a Markdown twin, its address follows the link.

- [Google Sheets Tips](https://www.owox.com/blog/topics/google-sheets-tips) — /blog/topics/google-sheets-tips.md
- [Vadym Kramarenko](https://www.owox.com/team/vadym-kramarenko) — /team/vadym-kramarenko.md
- [QUERY](https://www.owox.com/blog/articles/query-function-google-sheets) — /blog/articles/query-function-google-sheets.md
- [INDEX](https://www.owox.com/blog/articles/index-and-match-google-sheets) — /blog/articles/index-and-match-google-sheets.md
- [Book a Demo](https://www.owox.com/book-a-call) — /book-a-call.md
- [IMPORTHTML](https://www.owox.com/blog/articles/importhtml-function-google-sheets) — /blog/articles/importhtml-function-google-sheets.md
- [IMPORTXML](https://www.owox.com/blog/articles/importxml-function-google-sheets) — /blog/articles/importxml-function-google-sheets.md
- [IMPORTRANGE](https://www.owox.com/blog/articles/importrange-google-sheets) — /blog/articles/importrange-google-sheets.md
- [IMPORTFEED](https://www.owox.com/blog/articles/importfeed-function-google-sheets) — /blog/articles/importfeed-function-google-sheets.md
- [SPLIT](https://www.owox.com/blog/articles/how-to-split-cells-in-google-sheets) — /blog/articles/how-to-split-cells-in-google-sheets.md
- [QUERY with IMPORTRANGE](https://www.owox.com/blog/articles/query-with-importrange-google-sheets) — /blog/articles/query-with-importrange-google-sheets.md
- [OWOX Data Marts](https://www.owox.com/app-signup)
- [spreadsheet reporting](https://www.owox.com/features/spreadsheet-reporting) — /features/spreadsheet-reporting.md
- [Google Sheets Tips · Pivot tables in Google Sheets: how to create and use them · October 2, 2026](https://www.owox.com/blog/articles/pivot-tables-google-sheets) — /blog/articles/pivot-tables-google-sheets.md
- [Google Sheets Tips · FILTER function in Google Sheets: formula and examples · October 2, 2026](https://www.owox.com/blog/articles/google-sheets-filter-function) — /blog/articles/google-sheets-filter-function.md
- [Google Sheets Tips · XLOOKUP vs VLOOKUP in Google Sheets: the key differences · October 2, 2026](https://www.owox.com/blog/articles/key-differences-of-xlookup-vs-vlookup) — /blog/articles/key-differences-of-xlookup-vs-vlookup.md
- [See all articles →](https://www.owox.com/blog/articles) — /blog/articles.md
