How to Convert a TXT File to a CSV File
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.
Launch Microsoft Excel.
Click "Data," then "From Text." The Import Text File dialog box is displayed.
Click on a TXT file and click "Import" to display the Text Import Wizard.
Select the "Fixed width" radio button, then click "Next."
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."
Click "Finish," then "OK" to import data.
Click "File," then "Save As" and select "CSV (Comma delimited)" from the Save As Type drop-down menu in the Save As dialog box.
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.