How to Open a Text Document in Excel (CSV, TXT, and More)
Opening a text document in Excel sounds straightforward — but depending on the file type, how the data is structured, and which version of Excel you're running, the process can work several different ways. Done correctly, your data lands in neat, organized columns. Done wrong, you get a wall of unreadable text stuffed into a single cell. Here's what's actually happening under the hood, and how to navigate it.
Why Excel Doesn't Just "Open" Text Files Like Word Does
Excel is a spreadsheet application built around structured data — rows, columns, and cells. A plain text document (.txt) or comma-separated values file (.csv) contains data, but Excel needs to interpret how that data is organized before it can place it into a grid.
This is the core difference: Word displays text as-is. Excel has to parse it.
That parsing process depends on a delimiter — a character that separates one piece of data from the next. Common delimiters include:
- Commas (used in .csv files)
- Tabs (common in .txt exports from databases)
- Semicolons (common in European locale exports)
- Spaces or pipe characters (less common, but they exist)
If Excel guesses the wrong delimiter — or you skip the import step entirely — all your data collapses into column A.
Method 1: Open Directly From Excel (Quick, With Caveats)
For CSV files, Excel often handles this automatically:
- Go to File → Open
- Browse to your .csv file and open it
- Excel typically detects the comma delimiter and splits the data into columns automatically
This works well for clean, standard CSV files. The catch: if your file uses a non-standard delimiter, has inconsistent formatting, or contains dates and numbers that Excel misreads, you'll need more control.
For .txt files, Excel usually launches the Text Import Wizard automatically when you open the file this way — which gives you far more control.
Method 2: The Text Import Wizard (Most Reliable for .TXT Files)
This is the method that gives you full control over how Excel reads your file. 📄
In Excel 2016 and earlier, opening a .txt file triggers the wizard automatically. In Excel 2019, Microsoft 365, and Excel for Mac, you may need to use:
Data → Get External Data → From Text (older ribbon) or Data → Get Data → From File → From Text/CSV (Power Query, newer versions)
The classic wizard walks you through three steps:
Step 1 — File type: Choose Delimited (data separated by a character like a comma or tab) or Fixed Width (each field occupies a set number of characters, common in legacy exports). Most modern text files are delimited.
Step 2 — Choose your delimiter: Check the box that matches your file — Tab, Comma, Semicolon, Space, or Other (where you can type a custom character). The preview at the bottom updates in real time so you can see whether the columns are splitting correctly.
Step 3 — Set column data formats: This step is often skipped, but it matters. You can tell Excel to treat a column as Text, General, or Date. This is critical if you have:
- ZIP codes or ID numbers that start with zeros (use Text or Excel drops the leading zero)
- Dates in an unusual format
- Large numbers that Excel might convert to scientific notation
Method 3: Power Query (Excel 2016+ and Microsoft 365)
Newer versions of Excel include Power Query, a more powerful data import tool accessible via the Data tab. This approach is worth knowing if:
- You're importing the same text file repeatedly
- The file is large (Power Query handles big datasets more efficiently)
- You need to clean or transform the data before it lands in your spreadsheet
Power Query gives you a visual editor to adjust column types, remove blank rows, rename headers, and more — all before the data even touches your sheet. The import is also refreshable, meaning if the source file updates, you can refresh the query rather than reimporting from scratch.
Common Problems and What Causes Them
| Problem | Likely Cause | Fix |
|---|---|---|
| All data in one column | Wrong or missing delimiter detected | Use Text Import Wizard, specify correct delimiter |
| Leading zeros missing | Excel treating column as Number | Set column format to Text during import |
| Dates showing as numbers | Date format mismatch | Specify date format in Step 3 of wizard |
| Garbled characters (â€, é) | File encoding mismatch (UTF-8 vs ANSI) | Select correct encoding in the wizard's file origin dropdown |
| Scientific notation on long numbers | Excel auto-formatting large numbers | Import column as Text |
File Encoding: The Silent Troublemaker 🔍
One factor many users overlook is character encoding. Text files can be saved in different encoding formats — most commonly UTF-8 or ANSI/Windows-1252. If your file contains special characters (accented letters, currency symbols, non-Latin characters) and they appear garbled after import, the import wizard's File Origin dropdown is where you fix this. Selecting the correct encoding before importing prevents the issue entirely.
Which Method Fits Which Situation
The right approach varies considerably depending on what you're working with:
- A clean CSV with standard formatting often opens correctly with a double-click or File → Open, no extra steps needed
- A tab-delimited .txt file or a file with unusual delimiters benefits from the Text Import Wizard
- A file with tricky data types (leading zeros, dates, mixed formats) almost always needs the wizard's Step 3 column formatting
- A recurring import workflow or a large dataset is a strong candidate for Power Query
The version of Excel you're running also shapes which tools are available to you, and your operating system's locale settings can affect how Excel interprets date and number formats by default.
Getting the import right is mostly about understanding how your specific file is structured — and matching Excel's parsing settings to that structure rather than hoping the defaults get it right. 📊