IMPORTTEXT
Short answer
Load a CSV with a formula, no Power Query
IMPORTTEXT(path, [delimiter], [skip_rows], [take_rows], [encoding], [locale])
- Category
- Text & Data Cleanup
- Excel version
- Insiders
- Also searched as
- importcsv, import csv with formula, load text file into excel, bank file import formula, import csv without power query
What it returns
IMPORTTEXT reads a text file and returns its contents as a spilled array. One row of the file becomes one row of the spill, split into columns by the delimiter. IMPORTCSV is its shorter sibling: it assumes commas and UTF-8, so you only give it the path.
=IMPORTCSV("C:\Close\Bank\operating_jan.csv") returns the whole file, header row included, starting in the formula cell and spilling down and across.
The path can be a local file or a URL. For a web source, Excel may ask you to authenticate before it can read the file.
The result does not update when the file changes. Import functions refresh only when you click Refresh All on the Data tab. That is the most important fact on this page.
Both functions are in preview. Microsoft lists them for Microsoft 365 subscribers on the Insiders Beta channel, in Excel for Windows. Most people will see #NAME?. Check before you build a model around them.
Arguments that matter
IMPORTTEXT:
| Argument | Required | What it does |
|---|---|---|
path | Yes | The file location, local or a URL, as a text string or a cell holding one. |
delimiter | No | The column separator. Defaults to tab. Use "," for CSV and ";" for many European exports. |
skip_rows | No | Rows to skip from the top. A negative number skips rows from the end. |
take_rows | No | Rows to return after skipping. A negative number takes rows from the end. |
encoding | No | The file’s text encoding. Defaults to UTF-8. |
locale | No | Controls how dates and numbers are parsed. Defaults to the operating system’s locale. |
IMPORTCSV takes the same arguments without delimiter and encoding: IMPORTCSV(path, [skip_rows], [take_rows], [locale]). Note that skip_rows moves from third position in IMPORTTEXT to second in IMPORTCSV. Copying a formula from one to the other without adjusting it is an easy mistake.
skip_rows is how you drop the header block a bank prepends to its export: account number, statement date, column names. Count the rows once and set the number.
locale matters for any file produced in another country. A US model reading a UK bank file will read 03/02/2026 as March 2 unless the locale says otherwise.
In a financial model
The use case is the light import. A bank statement CSV for the cash reconciliation. A small sub-ledger export. A rate file from treasury. Files with a stable layout that arrive each month and need to land in the model without anyone opening them and pasting.
Before these functions, that meant either copy-paste, which nobody can audit, or a Power Query connection, which is more machinery than a two-hundred-row file needs. IMPORTCSV sits between them: one formula, visible in the cell, pointing at one path.
The spill is a query output, so treat it as one. Nothing is typed over it, per never paste over a query output. Formulas read from it and leave it alone, as in raw data stays raw.
Because it only updates on Refresh All, refresh before you review stops being advice and becomes a requirement. Record the file name and refresh time, as keep a load log suggests, so the reviewer knows which month’s file the numbers came from.
Power Query is still better for joins, type rules, unpivots, or a folder of files.
Worked example
A monthly bank export saved to a fixed folder. The file has four header lines (bank name, account number, statement period, column names), then transactions in columns Date, Reference, Description, Debit, Credit, Balance, then one closing-balance line at the bottom.
The file path sits in an input cell named BankFile, so next month you change the path, not the formula. On a tab named Bank:
=DROP(IMPORTCSV(BankFile, 4), -1)
IMPORTCSV skips the four header lines. DROP removes the closing-balance line. What spills is transactions only:
| Date | Reference | Description | Debit | Credit | Balance |
|---|---|---|---|---|---|
| 02/01/2026 | 88213 | Northwind Freight | 1,250.00 | 48,750.00 | |
| 03/01/2026 | DD-4410 | Contoso Leasing | 3,400.00 | 45,350.00 | |
| 05/01/2026 | RCPT-120 | Customer receipt | 12,000.00 | 57,350.00 |
To keep only the columns the reconciliation needs:
=CHOOSECOLS(DROP(IMPORTCSV(BankFile, 4), -1), 1, 4, 5)
Then confirm the import with a check: the last value in the Balance column should equal the opening balance plus total credits less total debits. Expected difference zero. If the bank formats amounts with symbols or separators, clean them first with REGEXREPLACE.
Old way vs new way
The Power Query version of the same import, in M:
let
Source = Csv.Document(File.Contents("C:\Close\Bank\operating_jan.csv"), [Delimiter=",", Encoding=65001]),
Trimmed = Table.Skip(Source, 4),
Dropped = Table.RemoveLastN(Trimmed, 1)
in
Dropped
The formula version:
=DROP(IMPORTCSV(BankFile, 4), -1)
Same result. The formula lives in a cell where a reviewer can see it, with no query editor to open. For a file this simple, that visibility is the win.
Where it breaks
IMPORTCSV returns #NAME?. The function is in preview and your Excel build does not have it, or a colleague’s does not. Fix: check your channel and version. For any model that leaves your desk, use Power Query until the functions reach general availability.
The numbers are last month’s. Import functions do not refresh on their own, not on open and not on recalculation. Fix: click Refresh All on the Data tab after the new file lands, and log the refresh.
Columns come back merged into one. The file uses semicolons or tabs, and IMPORTCSV only splits on commas. Fix: switch to IMPORTTEXT with the right delimiter.
Dates have day and month swapped. The file was produced under a different locale. Fix: set the locale argument to match the source, then spot-check a date after the twelfth of the month.
The first transaction is missing, or a header line appears as data. The bank added or removed a line in its header block, and skip_rows is a fixed count. Fix: check the row count each month, or test the first spilled row with a formula in the check row.
The formula works on your machine and errors on everyone else’s. The path points at your local drive. Fix: store the file in a shared location every user can reach, and keep the path in one input cell.
#SPILL!. Something sits in the range the import needs, or the formula is inside a Table. Fix: give the import its own tab with nothing below or to the right of it.
Related functions
- TAKE and DROP. Trim header and footer rows from the spill when
skip_rowsalone is not enough. - CHOOSECOLS. Keep only the columns the model reads from a wide export.
- VSTACK. Stack several imports, such as one bank file per account, into one table.
- REGEXREPLACE. Clean amounts that arrive with currency symbols or accounting parentheses.
- SUMIFS. Summarizes the imported rows into the reconciliation or the cash flow by period.
- TRIMRANGE. For data pasted or loaded by other means, ranges that follow the data without OFFSET.
