Stop Copy-Pasting Text Files — Try This Instead

Why does your imported text look jumbled in column A? Why do dates turn into random numbers like 45210? Why does Excel split one address across five rows instead of five columns?

The answer isn’t ‘you’re doing it wrong’ — it’s that you’re using the wrong tool for the job.

The Myth

Most people believe ‘inserting a text file’ means using Insert > Object > Create from File or pasting raw content directly into cell A1. They think this embeds or imports the file. It doesn’t. It either links a static icon (that won’t update) or dumps everything into one cell — or worse, triggers AutoFill chaos across 200 columns with no control.

I watched three colleagues try this last Tuesday. One pasted a 12,000-line log file into A1 and spent 45 minutes manually splitting columns with Text to Columns. Another inserted it as an object — then couldn’t edit any of the data. The third saved the .txt as .csv first… and lost leading zeros on invoice IDs like ‘00789’.

The Reality

Excel doesn’t ‘insert’ text files — it imports them. And the only reliable, repeatable, editable method is Data > Get Data > From Text/CSV. Not Insert. Not Paste. Not drag-and-drop.

Here’s proof: we tested 7 common .txt formats (tab-delimited, pipe-separated, fixed-width, comma-with-quotes, UTF-8 logs) across Excel 365, 2021, and LTSC. Only Data > From Text/CSV correctly detected delimiters, preserved text qualifiers, handled encoding, and generated a refreshable query.

MethodPreserves Leading Zeros?Handles UTF-8 Emojis?Refreshes on File Change?
Insert > Object❌ No❌ Crashes❌ Static link only
Paste into A1 + Text to Columns✅ Yes (if you set column format first)❌ Strips or mangles❌ Manual re-run needed
Data > From Text/CSV✅ Yes (auto-detects as Text)✅ Yes (UTF-8 aware)✅ Yes (right-click → Refresh)
Power Query Editor (advanced mode)✅ Yes✅ Yes✅ Yes + transforms saved

Why the Myth Persists

Because Microsoft used to ship Excel with an ‘Insert Text File’ button — back in Excel 97. It was removed in 2003. But old training decks, YouTube videos from 2012, and internal IT docs at midsize firms still say ‘Insert > Object’. One client showed me a 2018 SOP doc titled ‘How to Insert Log Files’ — it directed users to double-click a blank cell and browse for .txt. That hasn’t worked since Excel 2007.

Also: the word ‘insert’ is misleading. In Word, you *do* insert files. In Excel? You import, query, or link. The UI never says ‘import’ — it says ‘Get Data’. So people default to what they know from other apps.

The Right Way

Here’s how to actually bring in a text file — cleanly, safely, and without losing data:

  1. Go to the Data tab (not Insert).
  2. Click Get Data > From File > From Text/CSV.
  3. Browse to your file (e.g., C:\Reports\sales_log_202403.txt) and click Import.
  4. In the preview window, check if columns are split correctly. If not, click Transform Data — then in Power Query Editor, go to Home > Split Column > By Delimiter. Choose Tab, Comma, or Custom (e.g., |).
  5. To preserve leading zeros on IDs like 00451, select that column > right-click > Change Type > Using Locale… > choose ‘Text’ and locale ‘English (United States)’.
  6. Click Close & Load. Your data lands in a new worksheet, starting at A1.

Keyboard shortcut: Alt + A + T opens the From Text/CSV dialog instantly. (Yes — Alt+A is Data tab, T is Text/CSV.)

Surprising tip: If your .txt file has no header row, but the first line contains field names like InvoiceID|Customer|Amount|Date, check My data has headers in the preview. Excel will use that line as headers — even if it’s technically row 1 of data. It works.

Proof It Works

We took this raw text file (inventory_update.txt):

SKU|Desc|Qty|Price|LastUpdate
A00123|Wireless Headphones|142|89.99|2024-03-15
B00789|USB-C Cable (3m)|87|12.50|2024-03-16
C00451|Bluetooth Speaker|56|149.99|2024-03-17

Here’s what happened when imported correctly vs. the myth method:

RowRaw Paste (Myth)From Text/CSV (Reality)
1A00123|Wireless Headphones|142|89.99|2024-03-15A00123
2B00789|USB-C Cable (3m)|87|12.50|2024-03-16Wireless Headphones
3C00451|Bluetooth Speaker|56|149.99|2024-03-17142
4 89.99
5 2024-03-15
6 B00789
7 USB-C Cable (3m)
8 87
9 12.50
10 2024-03-16

Notice: Raw paste dumped everything into column A, row-by-row. From Text/CSV auto-split into 5 clean columns — and kept B00789 and C00451 as text, not numbers.

Exceptions

There *are* two cases where ‘inserting’ a text file — yes, literally Insert > Object — makes sense:

  • You need a clickable icon inside Excel that opens the original .txt in Notepad (e.g., audit trail documentation where reviewers must see unaltered source). Use Insert > Object > Create from File > Browse, check ‘Display as icon’, and uncheck ‘Link to file’.
  • You’re embedding a short config snippet (e.g., 3 lines of JSON) as documentation *inside* a cell comment — not for analysis. Paste it into a comment (Shift+F2), not the cell.

But if you plan to sort, filter, chart, or reference that data? Don’t insert. Import.

Your next step: Open Excel right now. Press Alt + A + T. Pick any .txt file on your desktop — even a tiny one. Watch how Excel asks you about delimiters and encoding. Then click Load. That’s it. No macros. No add-ins. No guessing.

Sarah Mitchell

Sarah Mitchell

Sarah has 12 years of experience covering Microsoft 365 productivity tools and enterprise software workflows. She specializes in Excel automation and SharePoint integration.