Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a tab separated file to CSV format?

Tags:

I have a text file in this format :

{  attribute1 attribute2 attribute3.... attributeN  value"A" value"B" value"C".... value"Z"  /* next line of values*/  } 

Each word is separated by a tab.

How do I convert to CSV format? I tried using Excel but it's giving compatibility issues.

like image 442
Sreesha Nair Avatar asked Apr 08 '11 04:04

Sreesha Nair


People also ask

How do I convert tab-delimited CSV to comma delimited CSV?

Select one or more lines you want to convert, or simply press Ctrl+A to select all lines. Open the File menu and choose 'Save Selected Items', or simply press Ctrl+S. From the 'Save as type' combo-box select 'Comma Delimited Text File' and ,choose or type the filename to save, and then click the 'Save' button.

How do I change a separator to CSV in Excel?

Change separator when saving Excel file as CSV Click File > Options > Advanced. Under Editing options, clear the Use system separators check box. Change the default Decimal separator. As this will change the way decimal numbers are displayed in your worksheets, choose a different Thousands separator to avoid confusion.


1 Answers

Import the data with excel (Data > Load from text file), using tab as a column separator. Then save the file as csv.

It cannot have compatibility issues, it's a basic task and i did it quite often in the past.

like image 59
Luca Fagioli Avatar answered Sep 18 '22 21:09

Luca Fagioli