4

I know that you can save an Excel spreadsheet as a CSV file and that this will put quotes around any fields that have commas in them. I have commas in one of my columns and want pipe (|) delimited output, just like the question asked here: Customize delimiter character with Excel CSV save-as with no Excel solution. I need an Excel solution due to limitations on my machine. Running version 15.27.

0
1

While I don't know how to use the pipe character | can I suggest you use "Tab-Delimited Text" which is one of the "Specialty Formats" listed under "Save As...".

Then if you wish you can use tr to change the tabs to pipes. tr '\t' '\|' < file.txt > file_converted.txt at the command line.

Note that most software that exports CSV files (including Excel) wraps a field with a comma in it in quotes (as you mention above). Also note that most software that imports CSV files can usually also perform the unwrap. Finally, you may well find that whatever you are doing with the exported file is perfectly happy with tab-delimited text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .