TextToTable

How to Open a TXT File in Excel Using the Text Import Wizard

A complete guide to opening plain text documents in Microsoft Excel. Compare Excel's built-in Text Import Wizard and Power Query with fast browser restructuring.

Need a quick fix without navigating Excel settings?

Paste your text or drop your .txt file below to format your columns and copy straight into Excel in one click:

Input Text
Supports tabs, commas, pipes, semicolons, and space-aligned columns
Paste your text above, then click Convert to preview your table

How to Open a TXT File in Excel: The Native Methods

Opening a plain text file (.txt) in Microsoft Excel is straightforward when the data is formatted cleanly, but it often confuses users when column separators are inconsistent or when newer versions of Excel change the default import interface.

Depending on your version of Excel, there are two native methods to import text files:


Method A: The Classic 3-Step Text Import Wizard (Legacy)

For decades, Excel featured the classic Text Import Wizard. While Microsoft hidden it behind advanced options in recent releases of Microsoft 365, it remains popular because of its simplicity.

Step 1: Choose Data Type
Open Excel, navigate to File → Open, change the file type filter from "Excel Files" to "Text Files (*.prn, *.txt, *.csv)", and select your file. The wizard asks whether your data is:

  • Delimited: Characters such as commas or tabs separate each field.
  • Fixed width: Fields are aligned in columns with spaces between each field.

Step 2: Set Delimiters
If you chose Delimited, check the delimiter used in your file (Tab, Semicolon, Comma, Space, or Other). A preview window at the bottom shows where the vertical column divider lines will be placed.

Step 3: Column Data Formats
This crucial step allows you to define the data type for each column (General, Text, Date, or Do Not Import). Setting sensitive fields (like Social Security numbers, ZIP codes, or inventory SKUs) to Text prevents Excel from stripping leading zeroes.

How to enable the Legacy Text Import Wizard in modern Excel:

Go to File → Options → Data. Under "Show legacy data import wizards", check "From Text (Legacy)". Then on the top ribbon, click Data → Get Data → Legacy Wizards → From Text (Legacy).


Method B: Modern Excel's Power Query Importer (From Text/CSV)

In Microsoft 365 and Excel 2019/2021, the default tool for importing text files is Power Query:

  1. Click the Data tab in the ribbon.
  2. Click From Text/CSV.
  3. Select your file and click Import.
  4. Excel analyzes the first 200 rows and displays a preview window. You can adjust the file origin encoding, delimiter, and data type detection.
  5. Click Load to place the data on a new worksheet, or Transform Data to open the Power Query editor for advanced data cleaning.

Why Excel's Native Import Often Fails on Messy Data

While Excel's native tools are capable, they make automated assumptions that frequently cause issues with unformatted data:

  • Dropped Leading Zeroes: Excel automatically converts strings of digits (such as 00521) to numeric integers (521).
  • Numbers With Commas Split Apart: In CSV files, values like "$1,200.00" can be split into two separate cells ($1 and 200.00) if quotes are missing or malformed.
  • Mixed-Spacing Breakage: Tables copied from terminal sessions or PDFs that rely on varied space runs often create dozens of extraneous empty columns in Excel.
  • Slow Multi-Step Interface: When you just want to copy 10 rows from an email into your spreadsheet, walking through a 3-step dialog or Power Query window takes unnecessary time.

Example: The Leading Zero & Currency Trap in Native Import

Consider this simple product record in a raw text file:

Raw Text in File

Postal Code	Store ID	Total Sales
01234	0089	$1,420.50
02138	0094	$2,850.00

❌ What Excel Does by Default

Excel auto-casts postal codes to numbers: 01234 becomes 1234 and 0089 becomes 89. If unquoted, $1,420.50 can split across two columns at the comma!

✅ TextToTable TSV Clipboard

TextToTable preserves strings as literal table cells. Postal codes retain their leading zeroes (01234) and comma-separated currencies remain intact in a single column.


When to Use Excel Native vs. When to Use TextToTable

ScenarioRecommended ToolReason
Copied text / quick clipboard tablesTextToTablePaste, auto-detect, copy to Excel in under 5 seconds.
Messy spaces or unusual delimitersTextToTableCustom delimiter support and interactive cell editing before export.
Massive files (> 500,000 rows)Excel Power QueryCan load directly into the Excel Data Model without memory constraints.
Automated recurring database queriesExcel Power QuerySupports scheduled background refresh from file paths.

More helpful resources:

Frequently Asked Questions About Opening TXT Files in Excel

Answers to common column splitting, wizard navigation, and formatting issues.

Why does my TXT file appear in one column in Excel?

If Excel cannot find standard delimiter characters like tabs or commas when you paste or open a text file, it dumps each entire line into Column A. In Excel, you can use the Text to Columns wizard to split them, or use TextToTable above to auto-detect columns and paste cleanly formatted TSV data.

How do I split text into columns in Excel?

Select the column containing your data, go to the 'Data' tab on the ribbon, and click 'Text to Columns'. Choose 'Delimited', click Next, check the delimiter used in your file (Tab, Comma, Space, or Other), and click Finish. Alternatively, use TextToTable to do this automatically.

How do I convert a TXT file to Excel?

You can either open it directly in Excel using File → Open and configure the Text Import Wizard, or paste/drop it into TextToTable above, which parses column boundaries instantly and lets you copy or export directly to XLSX.

How do I copy a text file into Excel?

Select all text in your file (Ctrl+A), copy it (Ctrl+C), and paste it into TextToTable. Click 'Copy to Excel' to copy the structured table to your clipboard. Then in Excel, select your target cell and press Ctrl+V to paste with all columns properly separated.

Can I convert text to an Excel table without uploading it?

Yes. TextToTable operates entirely in your browser. No files or text are uploaded to any server; all data processing and table formatting happen right on your device.

Is my data uploaded to a server?

No. Your data never leaves your computer. Everything runs locally in client-side JavaScript, ensuring complete privacy for sensitive spreadsheets and documents.