9

I want to export a huge excel file as a .csv, but the data contains commas within the cells.

How do I export the excel data to a .csv with the deliminator as this |

I've tried doing the usual "save as", but it is not working for my data.

11
  • This is probably better suited for www.SuperUser.com Commented Nov 6, 2017 at 17:09
  • 2
    howtogeek.com/howto/21456/…
    – PeterH
    Commented Nov 6, 2017 at 17:11
  • 1
    Why change the delimiter? What is wrong with quote marks around the comma-containing entries? Commented Nov 6, 2017 at 17:28
  • 2
    @RonRosenfeld Using the data in a python program, and quotes are also used in the data
    – SPYBUG96
    Commented Nov 6, 2017 at 17:30
  • 1
    Then just modify your parser to follow the rules for csv files. One example of the rules is The Comma Separated Value File Format Commented Nov 6, 2017 at 17:39

2 Answers 2

11

Hi Check out this method in the below link, its what I have used in the past

https://www.howtogeek.com/howto/21456/export-or-save-excel-files-with-pipe-or-other-delimiters-instead-of-commas/

Summary:

Control Panel –> Region and Language, and then click the Additional settings

When in the additional settings find “List separator”

Change this to anything you want, in your case you would want the | pipe

4
  • 2
    office 365 excel as of 20200724 - this solution does not work :(
    – Radek
    Commented Jul 24, 2020 at 14:36
  • 5
    For Windows 10 as of August 2021 the "Region and Language" group is named "Clock and Region" so the path to the setting is: Control Panel > Clock and Region > Additional Settings > List separator
    – sezmeralda
    Commented Aug 5, 2021 at 1:13
  • how to do it in macos?
    – uncle bob
    Commented Dec 29, 2021 at 11:57
  • 2
    This actually worked for me, lol. And thanks for the updated location, @sezmeralda ! Commented Sep 4, 2022 at 21:10
-2

By definition CSV stands for Comma Delimited.

Easy alternatives that were under your nose in the Save As window are:

"Formatted Text(Space Delimited)" though this won't be appropriate if you have spaces in your cells

"Text(Tab Delimited)" it is less likely you'll have tabs in your cells and people won't type those in to excel.

If you really want the 'pipe' | then I would suggest saving as tab delimited and running some kind of find & replace on the resulting text file. This is a bit of a workaround

A even bigger workaround is to concatenate the cells using a formula on the sheet with a | involved and the save as text only that column.

3
  • 5
    "By definition CSV stands for Comma Delimited." Correct, but Excel invalidates this definition by setting the delimiter to some regional settings. I.e. in some countries you will end up with semicolon delimiter :(
    – Radek
    Commented Jul 24, 2020 at 14:32
  • 6
    To be fair, for languages where comma's are used as a decimal separator, it does not make sense to use it as a separator.
    – KeithWM
    Commented Apr 23, 2021 at 12:38
  • I mean - the standard allows quoting to get around that issue. I.e: "2,00",monkey,"3,73",carrots,etc I believe that excel has ruined what should be one of the simplest file types, with the delimiter right in the description. Commented Nov 7, 2023 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.