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. Before you run it on a workbook other people depend on, try it on a copy or a few rows first. Undo only reaches back through the current session, so a quick trial run is the cheapest way to see exactly what will change before the file is saved and shared. For “change notepad to excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. 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 is what makes a workflow that saves repeating the same clicks every week useful in real work: repeatable, auditable, and not dependent on memory or luck.
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. When the result is not what you expected, undo straight away rather than repairing it by hand — undo restores the sheet exactly, while manual fixes tend to leave small inconsistencies behind that surface later.
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. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. If you take one thing from this page on “change notepad to excel”, make it the order of checks rather than the individual clicks: confirm what is selected, apply the step, and look at the result before moving on. That small routine is what keeps Excel work predictable when the same task comes back in a slightly different workbook.
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.