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.
Save Excel file as pipe-delimited values file
csvms office
Related Question
- How to open CSV file with Microsoft Excel and get the information into separate columns
- Excel 2011 crashes when I work on a large Excel file
- How to preserve leading zeroes in Mac Excel
- MacOS – Excel Mac – Some txt files can’t be opened/imported (“Grayed out”)
- Change the default save location for Excel 2016
- MacOS – Where is a “Save As” button in Excel on the MAC Pro to save as a New File Name
- Open CSV wtih Excel from Finder
Best Answer
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.