In Excel: use Data ▸ Get Data ▸ From Text/CSV, check the delimiter and encoding in the preview, then Load — or click Transform Data first to set columns like leading-zero IDs to Text.
On this page7
Go to Data ▸ Get Data ▸ From File ▸ From Text/CSV and pick the .txt file.
Check the preview: Excel guesses the delimiter — switch between Tab, Comma, and Semicolon until the columns line up.
If accented characters look garbled, set File Origin to 65001: Unicode (UTF-8).
Click Transform Data and set ID or phone columns to Text in Power Query so leading zeros survive.
Click Close & Load to put the data on a sheet; Refresh re-reads the file later.
For text already pasted into one column, use Data ▸ Text to Columns and choose Delimited or Fixed width.
What this does
From Text/CSV reads a .txt or .csv file through Power Query: it previews the data, guesses the delimiter (tab, comma, semicolon), lets you pick the encoding, and loads the result as a refreshable query. The legacy Text Import Wizard does the same job with fixed-width support and per-column types, but is hidden until you re-enable it under File ▸ Options ▸ Data. Text already pasted into one column is split with Text to Columns instead. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “open a txt file in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That turns a data step that keeps your analysis trustworthy into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
orders.txt contains tab-separated lines like 007→Bolt M8→42. Data ▸ Get Data ▸ From Text/CSV detects the tab delimiter and shows three columns; click Transform Data, set the first column's type to Text, then Close & Load — the ID stays 007 instead of collapsing to 7. Exports from databases, loggers, and legacy systems arrive as plain text; a controlled import gets them into rows and columns without losing zeros, dates, or special characters. If this is something you do often, add the command to the Quick Access Toolbar (right-click it on the ribbon and choose Add to Quick Access Toolbar) or learn its shortcut, so next time it is one click instead of a hunt through the menus.
In Google Sheets
This is a command rather than a formula, so there is no syntax to carry over. Google Sheets arranges its commands in menus across the top instead of a ribbon, names some of them differently and does not have every Excel command — look for the equivalent in the Sheets menus or its help before assuming the steps match. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Treat “open a txt file in excel” as a routine rather than a one-off. Once you know which setting or command controls it, the same few steps handle every workbook where it comes up in Excel, and you can explain them to a colleague in a sentence.
Common mistakes
- Loading ID columns as numbers, which strips leading zeros — set the column type to Text first.
- Accepting the guessed delimiter when the file actually uses semicolons.
- Garbled umlauts or accents from the wrong encoding — choose 65001: UTF-8 as File Origin.
- Choosing Fixed width for a delimited file (or the reverse), which shreds the columns.
- Hunting for the old Text Import Wizard — re-enable it under File ▸ Options ▸ Data ▸ legacy import wizards.
Frequently asked questions
From Text/CSV or the legacy Text Import Wizard?
From Text/CSV is the modern default: live preview, Power Query transforms, refreshable result. The legacy wizard survives under File ▸ Options ▸ Data if you need its exact old behavior.
How do I keep leading zeros when importing?
Click Transform Data in the import dialog and set the column type to Text before loading. Once a zero is dropped by a number conversion, it is gone.
How do I import a text file into Google Sheets?
File ▸ Import ▸ Upload, pick the .txt file, and leave the separator type on "Detect automatically" or choose tab/comma/custom.
Other ways people ask this
On the way here you may have searched this as “how to open txt file in excel”, “open a txt file in excel”, “how do i open a txt file in excel” and “excel open txt file” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to open txt file in excel”, “open a txt file in excel”, “how do i open a txt file in excel” all point at the one operation explained on this page, which is why they all lead here.