How to Use IMPORTDATA in Google Sheets: Simple Guide
Use the
IMPORTDATA function in Google Sheets to import data from a URL that points to a CSV or TSV file. The syntax is =IMPORTDATA(url), where url is the web address of the data file you want to load into your sheet.Syntax
The IMPORTDATA function has a simple syntax with one required argument:
- url: The web address (URL) of the CSV or TSV file you want to import.
Google Sheets fetches the data from this URL and fills your sheet with the content, splitting it into rows and columns automatically.
plaintext
=IMPORTDATA("url")Example
This example imports sample CSV data from a public URL. It shows how to use IMPORTDATA to load data directly into your sheet.
plaintext
=IMPORTDATA("https://people.sc.fsu.edu/~jburkardt/data/csv/hw_200.csv")Output
Height,Weight
65.78,112.99
71.52,136.49
69.40,153.03
68.22,142.34
67.79,144.30
68.70,123.30
69.80,141.49
70.01,136.46
67.90,112.37
66.78,120.67
Common Pitfalls
- Incorrect URL: The URL must point directly to a CSV or TSV file. If it points to a webpage or requires login,
IMPORTDATAwill fail. - Unsupported formats: Only CSV and TSV files are supported. Other file types like Excel or JSON won't work.
- Access restrictions: If the file is private or behind authentication, the function cannot access it.
- Slow loading: Large files may take time to load or cause errors.
Example of wrong usage:
=IMPORTDATA("https://example.com/page.html")Correct usage:
=IMPORTDATA("https://example.com/data.csv")Quick Reference
| Parameter | Description |
|---|---|
| url | The direct link to a CSV or TSV file to import data from |
Key Takeaways
Use IMPORTDATA with a direct URL to a CSV or TSV file to import data into Google Sheets.
The function automatically splits data into rows and columns based on the file format.
Ensure the URL is accessible and points directly to the data file, not a webpage.
IMPORTDATA does not work with private files or unsupported formats like Excel.
Large files may load slowly or cause errors, so use with appropriately sized data.