How to Use IMPORTCSV and IMPORTTEXT to Import Data in Excel

How to Use IMPORTCSV and IMPORTTEXT to Import Data in Excel

Microsoft Excel now includes two new functions for importing external data directly into your spreadsheet: IMPORTCSV and IMPORTTEXT. Instead of using the Data tab's import wizard or Power Query, you can pull CSV and text file data into cells with a simple formula that updates like any other function.

Getting Your File Path

Both functions need a file path as their first argument. The easiest way to get it: open File Explorer, navigate to your file, right-click it, and select Copy as path. This copies the full path with quotes included — Excel handles the formatting when you paste it into the formula.

Using IMPORTCSV

IMPORTCSV is the simpler of the two functions. The syntax is =IMPORTCSV(path, [skip_rows], [take_rows], [locale]), but only the path is required. Paste the file path and press Enter — the data spills across rows and columns as a dynamic array.

Excel showing IMPORTCSV formula in cell A1 with file path to a CSV file, formula bar displaying the full path, and tooltip showing function arguments
IMPORTCSV requires only the file path — paste it directly from File Explorer and press Enter

The imported data populates immediately with headers in row 1 and data flowing below. The function handles comma-separated formatting automatically, so you don't need to specify a delimiter.

Excel spreadsheet showing IMPORTCSV results with Date, Username, and State columns populated with sample user activity data from a CSV file
IMPORTCSV populates the spreadsheet with properly separated columns — dates, usernames, and states from the CSV

Using IMPORTTEXT

IMPORTTEXT is more flexible. Its syntax is =IMPORTTEXT(path, delimiter, [skip_rows], [take_rows], [locale]). The key difference is the delimiter parameter — you specify what character separates the values. This means IMPORTTEXT can handle files that use semicolons, pipes, tabs, or any other separator.

For a CSV file, you'd use a comma as the delimiter: =IMPORTTEXT("path","," ). For a tab-separated file, you'd pass a tab character instead.

When to Use Each Function

  • IMPORTCSV — Quick import of standard CSV files. Minimal arguments, handles comma separation automatically
  • IMPORTTEXT — Use when your file has a non-standard delimiter (semicolons, pipes, tabs) or when you need more control over the import
  • Both functions return dynamic arrays that spill automatically
  • Both support optional skip_rows and take_rows parameters for importing specific portions of a file

These functions offer a faster alternative to Power Query and Copilot-based imports when you just need to pull in a file quickly.

Revolutionizing Data Import with Copilot in Excel
Using Copilot to import and transform external data
How to Import S&P 500 Data into Excel and Utilize Excel's Stock Data Type
Importing financial data using Excel's built-in data types
Excel Import Data from the Web
Importing web data directly into Excel spreadsheets

Want to learn more? Visit courses.chrismenardtraining.com for online training courses.

Read more