How can I convert an xls file to a pipe delimited file?
migrated from stackoverflow.com Sep 24 '10 at 12:55
This question came from our site for professional and enthusiast programmers.
|
OpenOffice/NeoOffice lets you select delimiter on CSV saves. Both are free and let you open .xls and .xlsx. NeoOffice is the Mac port of OpenOffice, it is more Mac-like, but since it's a port of OpenOffice source it tends to trail in features just a bit. I still recommend NeoOffice of the two though. | |||
|
feedback
|
|
If you're comfortable with Python first install the
in the Terminal. Then give this rough script a try.
Run this script from the directory where the Excel file is located ( There are a number of options for the | ||||
feedback
|
|
If you don't have Excel installed (which will do that automatically) you can use a Java library to do that easily. I would recommend you to take a look at Apache's POI. | |||
|
feedback
|
|
Within Excel goto 'File > Save As' then under the 'Format' drop down select 'CSV Windows'. The key is the Windows version, why they have to include that just because it's a mac i'll never know... | |||||
feedback
|
Control Panel -> Regional Settings -> Advanced Settingsto|instead of,and then CSV will save with pipes. Perhaps there is a OSX equivalent. Alternatively use a text editor or sed/awk to find and replace. – mindless.panda Sep 24 '10 at 13:36