Data Import & Export

How to Import a TXT File into Excel and Format Data

Tauseeq MagsiTauseeq Magsi Nov 3, 2026 868 views

Question details

The user needs to import plain text data from a TXT or CSV file into an Excel spreadsheet and properly separate and format it into columns.

How to Import a TXT File into Excel and Format Data
Product
Microsoft Excel
Device & OS
not provided
Scenario
Transferring raw data from text files into a structured spreadsheet format for analysis, reporting, or easier viewing.
Observed behavior
The raw text needs to be parsed using delimiters or fixed widths to fit accurately into Excel cells and column formats.
Before you start

Before importing, open your TXT file in a standard text editor (like Notepad) to identify which delimiter (such as a comma, tab, or semicolon) separates your data fields.

Solution 1Recommended

Use the Text Import Wizard in Excel

The most straightforward method to open and parse a standard TXT file into structured Excel columns.

Excel's built-in Text Import Wizard allows you to define exactly how your text file should be split into columns by specifying delimiters and data types for each section.

1
Open the file in Excel

In Excel, click on 'File' > 'Open' and click 'Browse' to locate your file.

2
Select the correct file type

In the Open dialog box, change the file type dropdown menu in the bottom right corner from 'All Excel Files' to 'Text Files (*.prn;*.txt;*.csv)'.

3
Launch the wizard

Select your TXT file and click 'Open'. The Text Import Wizard will launch automatically.

4
Choose your data type

Select 'Delimited' if your data is separated by characters like commas or tabs, or 'Fixed width' if fields align in columns with spaces between each field. Click 'Next'.

5
Specify delimiters and format

Check the box corresponding to your file's delimiter (e.g., Tab, Comma, Space). Click 'Next', select the data format (General, Text, Date) for each column, and click 'Finish'.

Use the Text Import Wizard in Excel
Preview Your Data: The Text Import Wizard provides a live 'Data preview' window at the bottom. Check this preview at each step to ensure your columns are splitting correctly.
Seamless Data Import

Import TXT Files Easily with WPS Office

WPS Spreadsheet provides a highly intuitive Import Data feature that allows you to seamlessly open, parse, and format your text and CSV files into organized tables without any hassle.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing Spreadsheet document.
  2. 2. Access Data Import: Navigate to the 'Data' tab on the top ribbon, click on 'Import Data', and select 'Import Data' from the dropdown to browse for your TXT file.
  3. 3. Select Data Source: Choose the TXT file from your local storage and proceed to the Text Import dialog.
  4. 4. Define Delimiters: Select the appropriate delimiter (such as Tab, Comma, or Space) that separates your text data into logical columns.
  5. 5. Format and Finish: Assign specific data types to each column (e.g., Text, Date) in the preview window and click 'Finish' to successfully import the data.
Highly compatible with Microsoft Excel (.xlsx) and CSV formats.Intuitive Text Import Wizard for rapid data formatting.Easily specify custom delimiters and column data types.Free, lightweight, and user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is all my imported text crammed into a single column?

This happens when the wrong delimiter is selected during the import process. To fix this, re-import the file and ensure you check the correct box (like Comma, Tab, or Space) in the Text Import Wizard that matches how your raw data is separated.

Can I change the formatting of the imported data later?

Yes. Once the data is imported into your spreadsheet, you can select any column and use the standard formatting tools on the Home tab to change number formats, adjust text alignment, or apply date formatting.

What is the difference between importing a TXT and a CSV file?

A CSV (Comma-Separated Values) file specifically uses commas to separate data fields and can often be opened directly by double-clicking it. A TXT file might use any character (like tabs, spaces, or pipes) as a delimiter and usually requires an Import Wizard to parse correctly. Both can be imported using the same tools in Excel.

How do I split text into columns if I already pasted it into Excel?

If you already pasted the data into a single column, you don't need to re-import. Select the column containing the data, go to the 'Data' tab, and click 'Text to Columns'. This will launch a wizard similar to the import process to help you split the data.