How to Convert a TXT File to a CSV File

By Maureen Bruen

To convert a TXT (text) file to a CSV (comma separated values) file, you'll need to import the text file into Microsoft Excel and save the file in CSV format. Microsoft Excel has an import wizard to guide you through the process of editing a text file that is being converted to CSV. The step-by-step import wizard provides all the tools for defining each field to be separated by commas. It also provides field formatting tools for defining date and text fields if needed, but the general format is suitable for converting text to simple CSV files.

Step 1

Launch Microsoft Excel.

Step 2

Click "Data," then "From Text." The Import Text File dialog box is displayed.

Step 3

Click on a TXT file and click "Import" to display the Text Import Wizard.

Step 4

Select the "Fixed width" radio button, then click "Next."

Step 5

Click on the line in the Data Preview section to create a field-break line. Each break line should be created to separate one field from another. Create all of the break lines necessary to differentiate one field value from another, then click "Next."

Step 6

Click "Finish," then "OK" to import data.

Step 7

Click "File," then "Save As" and select "CSV (Comma delimited)" from the Save As Type drop-down menu in the Save As dialog box.

Step 8

Click "OK" and "Yes" to acknowledge the conversion of your text data to CSV format and save the new CSV file in the specified location.