0
0
Google Sheetsspreadsheet~20 mins

IMPORTDATA for CSV/TSV in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
IMPORTDATA Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What does IMPORTDATA return for a CSV URL?
You use the formula =IMPORTDATA("https://example.com/data.csv") in a Google Sheets cell. The CSV file contains:

name,age,city
Alice,30,New York
Bob,25,Los Angeles

What will be the output in the sheet starting from the cell with the formula?
Google Sheets
=IMPORTDATA("https://example.com/data.csv")
AA single cell with the entire CSV text as one string
BA table with 3 columns and 3 rows: name, age, city in first row; Alice, 30, New York in second; Bob, 25, Los Angeles in third
CAn error saying 'Unable to fetch data'
DOnly the first row of the CSV (header) is imported
Attempts:
2 left
💡 Hint
IMPORTDATA imports the whole CSV as a table, splitting by commas and new lines.
📊 Formula Result
intermediate
2:00remaining
How does IMPORTDATA handle TSV files?
You enter =IMPORTDATA("https://example.com/data.tsv") where the TSV file contains:

product	price	quantity
Pen	1.5	10
Notebook	3.0	5

What will be the output in the sheet?
Google Sheets
=IMPORTDATA("https://example.com/data.tsv")
AA table with 3 columns and 3 rows, splitting values by tabs
BA single cell with the entire TSV text as one string
CAn error because IMPORTDATA only works with CSV files
DOnly the first row (header) is imported
Attempts:
2 left
💡 Hint
IMPORTDATA supports both CSV and TSV files and splits by commas or tabs accordingly.
Function Choice
advanced
2:00remaining
Which formula correctly imports a CSV file from a URL?
You want to import data from a CSV file at https://data.example.com/info.csv. Which formula will correctly import the data as a table?
A=IMPORTDATA("https://data.example.com/info.csv")
B=IMPORTRANGE("https://data.example.com/info.csv", "Sheet1!A1:C10")
C=IMPORTXML("https://data.example.com/info.csv", "//table")
D=IMPORTHTML("https://data.example.com/info.csv", "table", 1)
Attempts:
2 left
💡 Hint
IMPORTDATA is designed for CSV and TSV files, while others are for HTML, XML, or other sheets.
🎯 Scenario
advanced
2:00remaining
You want to import a CSV but only get an error
You use =IMPORTDATA("https://example.com/data.csv") but get an error: "Could not fetch URL". What is the most likely reason?
AYou need to use IMPORTHTML instead
BThe CSV file is too large for IMPORTDATA
CThe file is not a CSV but an Excel file
DThe URL is not publicly accessible or requires login
Attempts:
2 left
💡 Hint
IMPORTDATA can only fetch files from URLs that anyone can access without login.
data_analysis
expert
2:00remaining
How many rows and columns does IMPORTDATA produce?
You import a CSV file with 5 rows and 4 columns using =IMPORTDATA("https://example.com/sample.csv"). The CSV has a header row plus 4 data rows.

How many rows and columns will the imported data occupy in the sheet?
A5 rows and 5 columns
B4 rows and 4 columns
C5 rows and 4 columns
D6 rows and 5 columns
Attempts:
2 left
💡 Hint
IMPORTDATA imports all rows including the header, and all columns as in the CSV.