Converting a text file (.txt or .csv) to Excel is a common task for anyone working with exported data, reports, or database dumps. Excel has a built-in import tool that handles this, but knowing the right settings makes the difference between clean data and a mess of text in one column. Here is the complete guide.
Method 1: Excel Text Import Wizard (Windows)
This is the most reliable method for any .txt or .csv file:
- Open Microsoft Excel and create a new blank workbook.
- Go to the Data tab → click "From Text/CSV" (or "Get Data → From File → From Text/CSV" in newer Excel versions).
- Browse to your .txt file and click Import.
- Excel shows a preview. In the Delimiter dropdown, select the separator your file uses:
- Tab — for standard .txt exports and .tsv files
- Comma — for .csv files
- Semicolon — common in European locale exports
- Check the preview — each column should be separated correctly.
- Click Load to import the data into a new sheet.
Method 2: Open the .txt File Directly in Excel
A quicker alternative that triggers the same Import Wizard:
- Open Excel.
- Go to File → Open → Browse.
- In the file type dropdown (bottom right of the dialog), change from "Excel Files" to "All Files".
- Navigate to your .txt file and click Open.
- The Text Import Wizard launches — follow the same steps as Method 1.
Method 3: Open in Google Sheets (No Software Needed)
If you do not have Excel, Google Sheets is a free alternative:
- Open Google Sheets and create a new spreadsheet.
- Go to File → Import.
- Upload your .txt or .csv file.
- Choose the separator type (detect automatically, comma, or custom).
- Click Import Data.
- Export as .xlsx via File → Download → Microsoft Excel (.xlsx) if you need an Excel file.
Method 4: Convert CSV Data Online
If your text file is CSV-formatted, you can process it in your browser first:
- CSV to JSON Converter — convert the CSV data to JSON for use in apps or APIs
- CSV to HTML Table — visualise the data as a table in your browser before importing
Fixing Common Issues After Import
- All data in one column: You chose the wrong delimiter. Re-import and select the correct separator.
- Numbers stored as text: Select the column → click the warning icon → choose "Convert to Number." (See our full guide on fixing text numbers in Excel.)
- Dates showing as numbers: Select the date column → Format Cells → Date → choose your date format.
- Extra blank rows: Use Data → Filter to find and delete blank rows, or press Ctrl+G → Special → Blanks → Delete rows.
Frequently Asked Questions
How do I convert a text file to Excel?
Open Excel, go to Data → From Text/CSV, select your .txt file, and use the Import Wizard to choose the delimiter (tab, comma, semicolon). Click Load and Excel imports the data into a spreadsheet.
Can I open a .txt file directly in Excel?
Yes. In Excel, go to File → Open → browse for your .txt file and open it. Excel automatically launches the Text Import Wizard to guide you through the delimiter settings.
What is the best delimiter for text files imported into Excel?
It depends on your file. Tab-delimited (.tsv) files are the most common for Excel. Comma-separated (.csv) is also widely used. Check your file in a text editor first to see what separator is used.
Can I convert a text file to Excel online without software?
If your text file is CSV format, use TextWonder's CSV to JSON converter or paste it into Google Sheets. Google Sheets can import .csv files directly via File → Import.
Why do some numbers show as text after importing a .txt file into Excel?
This happens when the column is not recognised as numeric during import. In the Import Wizard, set the column data type to "General" or "Number." After import, you can also fix this by selecting the cells and using the "Convert to Number" warning icon.