To learn how to open TXT file in Excel, use either File > Open for a quick one-time import or Data > From Text/CSV when you need more control. Excel previews the file and lets you choose the delimiter, character encoding, and data types before placing the text into worksheet columns. Saving the result as XLSX preserves your imported layout and Excel features without overwriting the original TXT data.

The correct method depends on whether the file contains tab-separated records, comma-separated values, fixed-width fields, or ordinary paragraphs. This guide covers both current Power Query workflows and the legacy Text Import Wizard, with special attention to leading zeros, dates, large files, and unreadable characters.

Can Excel Open a TXT File?

Yes. Microsoft Excel can open or import .txt files. Microsoft’s support documentation explains that a delimited TXT file commonly uses tab characters to separate fields, while CSV files typically use commas. Other exports may use semicolons, pipes, spaces, or fixed character positions.

Opening the file does not automatically change its format. Excel may display the original .txt extension in the title bar until you save the workbook. If you want to retain formulas, formatting, tables, charts, Power Query connections, or multiple worksheets, save a separate copy as an Excel Workbook (.xlsx).

Method 1: Open a TXT File Directly in Excel

Direct opening is a fast choice for a small, clean file that you need to inspect once. Depending on your Excel version and the file structure, Excel may launch the Text Import Wizard or interpret the data automatically.

  1. Open Microsoft Excel.
  2. Select File > Open > Browse.
  3. In the file-type list, choose Text Files or All Files.
  4. Select the .txt file and choose Open.
  5. If the import wizard appears, select the data type, delimiter, and column formats.
  6. Choose Finish, then confirm where Excel should place the data.

Microsoft notes that opening a TXT file can start the Text Import Wizard. The available screen may differ between Excel editions, so do not worry if your version displays a preview interface instead. The important task is to verify how Excel is dividing rows and columns before completing the import.

Choose Delimited or Fixed Width

Select Delimited when a specific character separates each field. Common examples include tabs, commas, semicolons, pipes, and spaces. Choose the matching delimiter and inspect the preview to confirm that values land in separate columns.

Select Fixed width when every field occupies a defined number of character positions. The wizard lets you add, remove, or move column break lines. Fixed-width files often come from older accounting, banking, government, or mainframe systems.

Set Column Data Formats

The Text Import Wizard can classify a column as General, Text, Date, or another available type. Use Text for identifiers that must retain leading zeros, such as postal codes, employee numbers, SKUs, and account codes. Use a matching date order when the source contains dates.

If you allow General format, Excel may convert numeric-looking text to numbers. That is convenient for arithmetic but risky for codes, long identifiers, or values whose exact characters must remain unchanged.

Method 2: Import TXT With Data From Text/CSV

For most current Excel workflows, Data > From Text/CSV provides the best balance of control and convenience. It creates a data connection, shows a preview, and can send the source through Power Query for cleaning and transformation.

  1. Open a new or existing Excel workbook.
  2. Select the worksheet and starting cell if you have a preferred destination.
  3. Go to Data > Get Data > From File > From Text/CSV, or select From Text/CSV in the Get & Transform Data area.
  4. Browse to the TXT file and select Import.
  5. Review the detected file origin or encoding, delimiter, and data preview.
  6. Select Load for a direct import or Transform Data to open Power Query.
  7. Choose Load To if you need an existing sheet, a specific cell, a PivotTable, the Data Model, or a connection-only result.

This method is especially useful when the same source file will be updated later. A refreshable query can repeat the import steps without requiring you to configure every column again.

What Does “File Origin” Mean?

File origin refers to the character encoding used to interpret the text. UTF-8 is common for modern files and supports many languages and symbols. Older exports may use a Windows code page or another regional encoding.

If names or words appear as question marks, boxes, or incorrect accented characters, change the file-origin option and inspect the preview. Do not load the data until the characters look correct.

How to Select the Correct Delimiter

The preview may detect tabs, commas, semicolons, or spaces automatically, but detection can be wrong. Choose the delimiter that consistently separates one field from the next. A vertical bar is often called a pipe delimiter.

If the file includes quoted text containing the delimiter, Power Query or the text-import engine should treat the qualifier correctly when the structure is valid. Avoid using a simple find-and-replace on the raw file unless you understand how quoted values are protected.

Method 3: Use Power Query to Clean the TXT Data

Select Transform Data in the preview window when the file needs more than a direct load. Power Query records each cleanup step so it can be repeated during a refresh.

Useful transformations include removing blank rows, promoting the first row to headers, splitting or merging columns, replacing errors, trimming extra spaces, changing data types, filtering records, and combining multiple files from a folder. Review the Applied Steps pane so the sequence remains understandable.

Preserve Leading Zeros in Power Query

Set the affected column’s data type to Text before Excel treats it as a number. If a transformation has already converted the column, delete or edit the automatic Changed Type step and assign Text deliberately.

Leading zeros are data for identifiers, even though they do not change a numeric value. A code such as 00125 should remain five characters if another system expects five characters.

Control Dates and Regional Formats

A date such as 03/04/2026 is ambiguous because it can mean March 4 or April 3. In Power Query, choose a data type using the correct locale when the source’s regional format differs from your computer settings.

Keep the original date text during initial inspection if you are uncertain. A wrong automatic conversion may be difficult to distinguish from a valid date after the import is complete.

How to Import a TXT File Into an Existing Worksheet

Use the Data import method rather than opening the file as a new workbook. Click the cell where the imported table should begin, choose Data > From Text/CSV, select the file, and use Load To to control the destination.

Make sure enough blank rows and columns are available. Loading a query into occupied cells can overwrite or conflict with existing worksheet content. A separate raw-data sheet is often safer, while formulas, PivotTables, and charts can reference that sheet.

How to Preserve Data Exactly

Excel is designed to interpret values, which means it may change text that looks like a number, date, fraction, percentage, or scientific notation. That behavior is useful for analysis but can damage identifiers.

Before loading, classify sensitive fields as Text. Pay particular attention to the following data:

  • Product codes and SKUs with leading zeros
  • Credit, account, membership, or employee identifiers
  • Long numeric strings that exceed Excel’s numeric precision
  • Values containing E that could be read as scientific notation
  • Date-like codes such as 1-2 or MAR1
  • Telephone numbers and postal codes

After import, compare a sample of rows with the original TXT file. This small validation step can catch silent conversions before the workbook is used for reporting or uploaded to another platform.

Common Problems When Opening TXT in Excel

Most import problems come from delimiter detection, encoding, or automatic type conversion. Use the preview to solve the issue before loading data whenever possible.

All Text Appears in One Column

Excel did not recognize the separator. Reimport through Data > From Text/CSV, select the correct delimiter, or use Text to Columns. Check whether the file uses tabs, pipes, semicolons, or repeated spaces rather than commas.

Special Characters Look Wrong

Choose the correct file origin or encoding. UTF-8 is common, but a legacy Windows export may use another code page. If possible, create a fresh UTF-8 version from the source system.

Leading Zeros Disappear

Excel converted the field to a number. Reimport it and set the column data type to Text before loading. Adding zeros afterward may not recover the original length if different records used different numbers of digits.

Dates Change Format or Swap Day and Month

Import the source column as Text or convert it with the correct locale in Power Query. Confirm the intended date order with the data provider instead of guessing from a few examples.

Large Numbers Lose Digits

Excel numeric cells have a precision limit, so long identifiers should be imported as Text. If the value is an ID rather than a quantity used in arithmetic, Text is the correct semantic type.

The File Is Too Large or Excel Freezes

Use Power Query to filter the rows before loading, import only the columns you need, or process the file with a database, Python, or another data tool. Work on a copy and avoid repeatedly double-clicking a file that is known to exceed practical spreadsheet limits.

Best Practices for TXT-to-Excel Imports

A reliable import is repeatable and validated. Treat the TXT file as source data rather than a visually formatted document.

  • Keep an unchanged copy of the source file.
  • Inspect the raw text in a text editor before importing.
  • Identify the delimiter and encoding deliberately.
  • Mark codes, phone numbers, and long identifiers as Text.
  • Validate row counts and a sample of critical values.
  • Use Power Query for repeated or multi-step imports.
  • Save the result as XLSX under a new filename.
  • Document assumptions about column names, dates, decimal symbols, and missing values.

If you need to create a clean UTF-8 text sample first, prepare the content with TXT File Maker, download the TXT file, and test the delimiter pattern before importing it into Excel.

Frequently Asked Questions

These quick answers cover common related searches about TXT files and Excel. Menu wording can vary slightly by Excel edition.

Can I open a TXT file by double-clicking it?

Yes, if Excel is selected through Open With or associated with TXT files. For better delimiter, encoding, and data-type control, open Excel first and use Data > From Text/CSV.

What delimiter should I choose?

Choose the character that separates fields consistently in the raw text. Common options are tab, comma, semicolon, pipe, and space. Verify the result in the preview.

How do I open a tab-delimited TXT file in Excel?

Import it through Data > From Text/CSV and select Tab as the delimiter. The preview should place each tab-separated field in its own column.

How do I stop Excel from removing leading zeros?

Set the affected column’s type to Text before loading. In the legacy wizard, choose Text as the column data format; in Power Query, assign the Text data type.

Why are foreign-language characters corrupted?

The selected file origin does not match the source encoding. Try UTF-8 first or choose the encoding documented by the system that produced the file.

Can Excel open a very large TXT file?

Excel can preview and transform large sources, but a worksheet cannot exceed 1,048,576 rows and 16,384 columns. Filter, aggregate, split, or use a database when the source exceeds those limits.

Does opening a TXT file convert it to Excel format?

No. Opening or importing displays the text in Excel, but the source remains TXT. Save a separate copy as XLSX to create a true Excel workbook.

Final Thoughts

The most reliable way to learn how to open TXT file in Excel is to use Data > From Text/CSV, inspect the preview, and control the delimiter, encoding, and column types before loading. Direct File > Open is convenient for a simple one-time file, while Power Query is better for repeatable imports and cleanup.

Protect the original file, preserve identifiers as text, verify dates and special characters, and save the finished workbook as XLSX. Those steps prevent the quiet data changes that cause most TXT-to-Excel problems.