Your Guide to How To Convert Txt File To Xls

What You Get:

Free Guide

Free, helpful information about Files, Data & Cloud Storage and related How To Convert Txt File To Xls topics.

Helpful Information

Get clear and easy-to-understand details about How To Convert Txt File To Xls topics and resources.

Personalized Offers

Answer a few optional questions to receive offers or information related to Files, Data & Cloud Storage. The survey is optional and not required to access your free guide.

How to Convert a TXT File to XLS: Methods, Tools, and What to Know First

Plain text files are everywhere — exported from databases, downloaded from apps, generated by scripts. But when you need to analyze, sort, or share that data, a .txt file rarely cuts it. Excel's .xls (or .xlsx) format gives you structure, formulas, and formatting that a plain text file simply can't provide.

Converting between these formats is straightforward once you understand what's actually happening — and which method fits your situation.

What's the Difference Between TXT and XLS?

A TXT file stores raw, unformatted text. Data inside it is usually separated by a consistent character — a comma, tab, pipe (|), or space — to indicate where one value ends and another begins. There's no built-in concept of rows, columns, or data types.

An XLS or XLSX file is a structured spreadsheet format developed by Microsoft. It organizes data into cells, rows, and columns, and supports formulas, data types (dates, currency, integers), conditional formatting, and more.

The conversion process is essentially parsing — reading the separator pattern in your text file and mapping each value into the correct spreadsheet cell.

How Delimiters Determine the Conversion 📄

Before converting, you need to know how your TXT file is structured. The most common formats:

Delimiter TypeExampleAlso Known As
CommaJohn,Smith,42CSV (Comma-Separated Values)
TabJohn⇥Smith⇥42TSV (Tab-Separated Values)
PipeJohn|Smith|42Pipe-delimited
SpaceJohn Smith 42Space-delimited
Fixed-widthJohn Smith 42Fixed-width format

Getting the delimiter wrong during import results in all your data landing in a single column instead of spreading across many — one of the most common conversion mistakes.

Method 1: Open Directly in Microsoft Excel

Excel has a built-in Text Import Wizard that handles most TXT files without third-party tools.

Steps:

  1. Open Excel and go to File > Open
  2. Change the file filter to All Files and select your .txt file
  3. The Text Import Wizard launches automatically
  4. Choose Delimited or Fixed Width depending on your file
  5. Select your delimiter (comma, tab, etc.)
  6. Preview the column structure, adjust data types if needed
  7. Click Finish, then Save As → choose Excel Workbook (.xlsx)

The wizard lets you set data types per column — important if you have fields like ZIP codes or phone numbers that Excel might otherwise reformat as integers.

In newer versions of Excel (Microsoft 365 and Excel 2016+), you can also use Data > Get & Transform Data > From Text/CSV, which provides a more modern import experience with better handling of encoding and data previews.

Method 2: Use Google Sheets (Free, Browser-Based) 🌐

If you don't have Microsoft Office, Google Sheets handles TXT-to-spreadsheet conversion reliably.

Steps:

  1. Go to sheets.google.com and create a new spreadsheet
  2. Go to File > Import
  3. Upload your TXT file
  4. Choose your separator type (or let Sheets detect it automatically)
  5. Confirm the import
  6. Download as Microsoft Excel (.xlsx) via File > Download

Google Sheets is particularly useful when working on Chromebooks, shared devices, or when you want a quick one-off conversion without installing software.

Method 3: LibreOffice Calc

LibreOffice Calc is a free, open-source alternative to Excel that handles TXT imports with a similar wizard to Microsoft's. It supports saving directly to .xls or .xlsx format.

This is a strong option for users who regularly work with large files, unusual encodings (UTF-8, UTF-16, Latin-1), or fixed-width formats — LibreOffice's import wizard gives fine-grained control over character encoding, which matters when working with international data sets.

Method 4: Command-Line and Scripted Conversion

For developers, data analysts, or anyone dealing with bulk files, scripted conversion is more efficient than opening files one by one.

Python with the pandas library is the most common approach: