How to change a tab-delimited text file to a CSV file

Updated: 11/13/2018 by Computer Hope
Microsoft Excel logo

A tab-delimited text file is a text file whose units of text are separated by a tab character. These tab characters organize the text into tabular data. You can convert the file to a CSV (Comma-Separated Values) file using a spreadsheet application, such as Microsoft Excel or LibreOffice Calc.

Using Microsoft Excel

  1. Open Microsoft Excel.
  2. Click the File tab in the Ribbon menu and click the Open option.
  3. Click the Browse option to bring up the Open or Browse window.
  4. Next to the File Name field, click the File Type drop-down menu and select the Text Files option.
  5. Navigate to the location of the text file, select it, and click the Open button.
  6. In the Text Import Wizard, the Delimited option should already be selected (shown below). Click the Next button to go to Step 2 of the wizard.

Microsoft Excel Text Import Wizard Step 1

Note

If the text file has a header row (row that identifies the name of each column of data), click the check box for My data has headers.

  1. Make sure the Tab option is checked and validate the data is separated correctly in the Data preview section.

Microsoft Excel Text Import Wizard Step 2

  1. To format each column of data, like text, date, or numeric, click the Next button and select the format type for each column of data. If you don't need to format each column of data, click the Finish button.
  2. The text file data is converted to spreadsheet format. Again, click the File tab in the Ribbon menu and select the Save As option.
  3. In the Save As window, select the CSV (Comma delimited) (*.csv) option in the Save as type drop-down menu.
  4. Type a name for the CSV file in the File name field, navigate to where you want to save the file, then click the Save button.

The file is saved as a CSV file, a text file that uses commas as delimiters. It can be opened in a spreadsheet application or in any text editor.

Using LibreOffice Calc

LibreOffice is a free, open-source office productivity software suite that runs on many operating systems, including Linux, Microsoft Windows, and macOS. Its spreadsheet application is LibreOffice Calc.

Follow these steps to open a tab-delimited text file in LibreOffice Calc, view it as a spreadsheet, and save it as a CSV file.

  1. Open LibreOffice Calc.
  2. From the File menu, select Open and select your tab-delimited text file.

LibreOffice Calc file menu

  1. Once the Text Import dialog box opens, by default, it interprets tabs, commas, and semicolons as column delimiters, and newlines as row delimiters.

LibreOffice Calc Text Import options dialog

  1. Unselect Comma and Semicolon.

Unselecting the comma and semicolon delimiter options in the LibreOffice Calc Text Import options dialog

  1. Click OK. Your data loads into a spreadsheet.

Data loaded into spreadsheet

  1. You can now select Save As from the file menu, and choose Text CSV (.csv) as the File Type.

Saving as CSV

  1. To save the file, click Save.