IMPORTTEXT Function in Excel: Import a Text or CSV File Into the Grid

IMPORTTEXT Function in Excel: Import a Text or CSV File Into the Grid 1
⏱ 2 min readUpdated 5 October 2026

Lookup & referenceLevel: IntermediateAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. IMPORTTEXT in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions

IMPORTTEXT (2026) loads a .txt, .csv or .tsv file into a refreshable dynamic array with one formula, with options for delimiter, encoding and rows to skip. A lighter alternative to Power Query for simple imports.

Advertisement

Syntax

=IMPORTTEXT(path, [delimiter], [skip_rows], [take_rows], [encoding], [locale])
Argument What it means
path File path or URL
delimiter e.g. “,” or “|”
skip_rows Header/junk lines to skip

Examples

Example 1

=IMPORTTEXT(A2,",")

Result: (spills the file's rows and columns). See the worked example table below for more cases.

IMPORTTEXT in practice

Where you will use it

  • Pulling a daily bank or ERP export into a sheet
  • Reading pipe-separated files
  • Quick refreshable imports without Power Query

Worked example

FileFormulaResult
D:\Data\sales.csv=IMPORTTEXT(A2,",")(spills the file's rows and columns)
D:\Data\erp.txt=IMPORTTEXT(A3,"|",1)(spills the file's rows and columns)
D:\Dataranch.csv=IMPORTTEXT(A4,",",3)(spills the file's rows and columns)

Not calculated here: IMPORTTEXT needs the latest Microsoft 365 (rolling out from 2026). The result shown is what it returns.

Mistakes people make

MistakeWhat to do instead
Files that change shapeDownstream formulas break; refer to columns by header with XLOOKUP/CHOOSECOLS
Large filesUse Power Query for heavy cleaning or millions of rows

IMPORTCSV · TEXTSPLIT

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

Advertisement
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *