Skip to main content
← All functions

IMPORTTEXT function

Import a delimited text source in supported Excel builds.

Try the attached-file practice below with a sample or a local file. It supports explicit source formats in an isolated browser worksheet. Windows Excel supports additional file locations, authentication and type-inference behavior; native compatibility and unsupported options are still being verified.

Syntax

IMPORTTEXT(path, [delimiter], [skip_rows], [take_rows], [encoding], [locale])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
pathYesThe file path or URL in native Excel. In this browser practice, use the exact attached filename shown in A2.
delimiterNoThe source separator; tab is the default. This practice treats a string as one complete delimiter token. Native fixed-width arrays are not implemented here.
skip_rowsNoRows to discard before taking output. Positive values discard from the start; negative values discard from the end. Omitted means zero.
take_rowsNoRemaining rows to return. Positive values take from the start; negative values take from the end. Omitted means all remaining rows.
encodingNoThe source text encoding. UTF-8 is the default; this practice also accepts UTF-16 LE/BE and Windows-1252 by name or code page.
localeNoThe regional formatting convention. This practice defaults to en-US and also accepts en-GB, de-DE and fr-FR; its conversion policy is shown below.

Import a local text source

Choose an original sample or attach a text file. Change the import formula, inspect its spilled result and download the imported values. Your source stays in this tab.

An omitted delimiter means tab. A quoted newline belongs to one field and does not create another source record. An error-looking source label remains text.

stock.tsv · 57 bytes · Original worked source

Item	Units	Note
Cedar	3	"Line one
Line two"
Paper	0	#N/A

The source filename is in A2. Local filenames are matched exactly; this practice does not open arbitrary paths or web URLs. Windows Excel needs an accessible path when you adapt the formula.

Supported input formats and compatibility

This local practice supports up to 51 source rows and 20 columns, quoted delimiters/newlines and signed skip/take. IMPORTCSV reads UTF-8. IMPORTTEXT accepts UTF-8, UTF-16 LE/BE and Windows-1252 by name or code page (65001, 1200, 1201, 1252), with a literal delimiter of up to eight characters. Fixed-width arrays and network authentication remain pending.

Explicit practice locales are en-US (default), en-GB, de-DE and fr-FR. Finite decimal/scientific fields become numbers; blank, date-like, boolean and error-looking fields remain text. This conversion policy has not been certified against Windows Excel locale/type inference. Unsupported options, unreadable bytes, an empty selection or a blocked spill produce an error. Source data is not stored in browser storage or uploaded.

Microsoft currently documents these functions for Windows Microsoft 365 Insider Beta. Native Excel and Google Sheets round trips remain unverified. This attached-source practice is separate from the flat function-example count.

Reference and compatibility

Original SheetTutor reference notes / Microsoft documentation. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.