Text Excel File: How to Open, Import, and Save Data

How-to basics · Updated November 18, 2026

To open a text file in Excel for Microsoft 365 on Windows, use Data > Get Data > From File > From Text/CSV, select the file, check the preview and delimiter, then choose Load. To turn an Excel sheet into a text file, use File > Save As and select a text format; text exports do not preserve all workbook features.

What people mean by a text file in Excel

A text file stores characters rather than the full structure of an Excel workbook. Common examples are a comma-separated values file (.csv) and a tab-delimited file (.txt or .tsv). These files can contain rows and columns of data, but they do not store Excel formulas, cell formatting, charts, multiple worksheets, or most other workbook features.

The phrase “text Excel file” can therefore refer to either opening plain-text data in Excel or saving spreadsheet data as plain text. Those are related but different tasks. Importing a text file brings its contents into Excel, where you can analyze and format them. Exporting a worksheet as text creates a simpler file that can be read by other programs, but it can discard information.

An .xlsx file is an Excel workbook, not a plain-text file. It preserves workbook structure and formatting. A .csv file, despite often being opened with Excel, is plain text with values separated by a delimiter. The extension tells you something about the file’s intended structure, but it does not guarantee that every program will interpret it identically.

Import a text file into Excel

For a reliable import on Windows, use Excel’s data import rather than double-clicking the file in File Explorer. Importing gives you a preview and lets you check how Excel will divide and interpret the data before loading it.

  1. Open a blank workbook or the workbook where you want the data.
  2. Select Data > Get Data > From File > From Text/CSV, then browse to the .txt, .csv, or other supported text file.
  3. Review the preview. Check that the correct character encoding and delimiter are selected and that the data appears in the intended columns.
  4. Choose Load to put the imported data into a worksheet. Choose Transform Data if you need to change column types, split a column, remove rows, or otherwise prepare the data first.

The import route is especially useful for identifiers, dates, and large files because you can tell Excel how to treat columns before loading them. The exact labels or available options can vary by Excel build and file type. On Mac, import commands and their availability differ between releases; look under the Data tab for text or data import options. If the Windows path is not present on your Mac, use File > Open to select the text file and follow the import prompts offered by that version.

You can also open some text files directly with File > Open. Excel may display an import prompt, or it may open the file using default regional settings. That is convenient for a quick look, but it gives you less opportunity to verify settings in advance. If the columns or characters look wrong, close the file without saving and import it through the Data tab instead.

Choose the right delimiter and layout

A delimiter is the character that separates fields in a delimited text file. Commas are common in CSV files, while tabs are common in text exports. A semicolon or another character may be used, depending on the program that created the file and the computer’s regional settings. If the preview shows every row in one column, Excel may be using the wrong delimiter. If values are split into too many columns, the chosen delimiter may also occur inside the data.

CSV fields can contain commas when they are enclosed in quotation marks. For example, a line might contain 42,"Portland, Oregon",Active. A properly configured CSV reader treats the quoted location as one field, not two. When inspecting or producing text by hand, do not assume that every comma marks a new column; quoting and escaping rules matter.

In the Text/CSV preview, select the delimiter that matches the source file and check several rows, not just the first one. If you choose Transform Data, you can further split a selected column using Home > Split Column > By Delimiter in the Power Query Editor. A fixed-width file is different: fields are separated by position rather than a visible character. It may need to be split at specified character positions in the import or transformation process.

Look for a header row as well. If the first row contains labels such as Date, Product, and Quantity, treat those as column names rather than ordinary records when appropriate. If the first row is actual data, promoting it to headers would remove that record from the data area. The right choice depends on how the source file was created.

Check encoding and column data types

Encoding determines how text characters are represented in the file. A mismatch can turn accented letters, non-Latin scripts, or symbols into garbled characters. If names that should contain characters such as é appear corrupted, reopen the import and try the correct file origin or encoding in the import preview. UTF-8 is a common encoding for modern text files, but it is not the only one.

Excel also guesses what kind of data each column contains. That can be helpful for ordinary numbers and dates, but guesses can damage data that only looks numeric. A product code such as 00127 may become 127; a long account identifier may be rounded if treated as a number; and a value such as 3-4 may be interpreted as a date under some settings. These are not just display changes if Excel has already converted the underlying value.

For identifiers, postal codes, phone numbers, and values where leading zeros or every digit must be preserved, set the column’s type to Text during import or in Power Query. For dates, confirm the date order used by the source. A value such as 04/05/2026 can mean April 5 or May 4 depending on the convention. Importing it with an explicit locale or checking the source documentation is safer than relying on a guess.

After import, spot-check records against the original file, especially the first and last rows, unusual characters, blank fields, and long numeric-looking values. If Excel has converted a value incorrectly, changing its display format afterward may not restore the original text. In that case, import again with the column typed as Text.

Save a worksheet as a text file

To export spreadsheet data, select File > Save As, choose a folder, and select the required file type from the format list. Common choices include CSV UTF-8, CSV, and tab-delimited text. The exact names shown can vary slightly by Excel version. Use CSV when the receiving system expects comma-separated fields; use tab-delimited text when it expects tabs or when commas are common inside the data.

Text export is usually limited to the active worksheet. Excel warns that features in a workbook may not be compatible with the selected format. A text file does not retain formatting, formulas as formulas, charts, multiple sheets, or workbook-level features. A formula cell is exported as its displayed result, so check that formulas have calculated and that the displayed values are suitable before saving.

If you need to keep the workbook and also provide a text copy, save the original as .xlsx first, then use Save As to create the text version. When Excel asks whether to keep using the text format or retain workbook features, choose the option that keeps the text format for the exported copy. The original workbook remains available as long as you saved it separately.

CSV UTF-8 is often a good choice when the recipient needs a CSV and the data includes characters beyond basic English letters. Even so, confirm the receiving application’s requirements. Some systems expect a particular delimiter, encoding, header-row convention, or date format. A file that opens correctly in Excel is not automatically formatted exactly as another system requires.

Common problems and how to avoid them

  • Everything appears in one column: Reimport the file and select its actual delimiter. A tab-separated file should not be interpreted as comma-separated data.
  • Leading zeros disappear: Import the relevant column as Text. Applying a text number format after conversion may not recover zeros that Excel removed.
  • Dates change meaning: Check the source’s date convention and set an appropriate type or locale during import. Do not infer the month and day order from one ambiguous value.
  • Characters look incorrect: Choose the matching encoding, often UTF-8 for current files, and inspect the preview before loading.
  • CSV no longer has the expected separator: Excel may use regional list-separator settings when opening or saving CSV. Check the recipient’s requirements and inspect the exported file in a plain-text editor if the delimiter matters.
  • Only one worksheet is in the export: That is normal for text formats. Save a separate workbook if you need to preserve multiple sheets and other Excel features.

One common misconception is that changing a file’s extension changes its format. Renaming report.xlsx to report.csv does not convert an Excel workbook into valid CSV. Use Save As to perform a conversion. Similarly, adding .xlsx to the name of a text file does not make it a proper workbook.

Text file, CSV, or Excel workbook?

Choose the format based on what the file needs to do. A plain-text file is simple and widely supported, but it has limited structure. CSV is convenient for exchanging a single table, though separators and regional settings can cause confusion. An Excel workbook is the better choice when the recipient needs formulas, formatting, more than one sheet, or other workbook features.

  • Use .xlsx to keep a working spreadsheet, calculations, formatting, and multiple worksheets.
  • Use .csv when another application requests a simple table with comma-separated fields.
  • Use tab-delimited .txt or .tsv when the destination expects tab-separated fields or commas are frequent in the data.

If a system specifies an exact file type, delimiter, or encoding, follow that specification rather than choosing based on the file extension alone. For recurring imports, Power Query can save transformation steps so you can refresh the process with updated source data instead of repeating each cleanup manually.

Frequently Asked Questions

Can Excel open a .txt file?
Yes. You can use Data > Get Data > From File > From Text/CSV on Windows, or open the file through File > Open. Check the delimiter, encoding, and column types so the data is interpreted correctly.

Is a CSV file an Excel file?
No. CSV is a plain-text format for tabular values, although Excel can open and create it. It does not preserve workbook features such as multiple sheets, formulas as formulas, or cell formatting.

How do I stop Excel removing zeros from a text file?
Import the column as Text before loading the data. This keeps values such as 00042 as text instead of allowing Excel to convert them to the number 42.

How do I save an Excel sheet as a .txt file?
Select File > Save As, choose a text format such as tab-delimited text, and save. Excel generally exports only the active worksheet, so preserve a separate .xlsx copy if you need the full workbook.

Why does my CSV open in one column?
The delimiter Excel selected may not match the file. Import it through the Data tab and choose the delimiter shown in the source, such as a comma, semicolon, or tab.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.