0

My default it seems that Excel saves a csv with a double quote as a quote character... so a test field like this:

{"abc":1234}

gets saved as

"{""abc"":1234}"

If I could tell Excel to use a single quote (') as a quote character it would be saved the first way... I need this functionality because a third party program (Bloomberg) doesn't recognize the " as an escape character and imports the 2nd way literally.

Is there a way to tell Excel to use a different character for the quote character?

Brian Rice
  • 3,107
  • 1
  • 35
  • 53
  • did you check this: https://stackoverflow.com/questions/4221176/excel-to-csv-with-utf8-encoding?rq=1. Seems its tricky: best is to get Excel 2016 and save as Unicode csv. – Kai Aeberli Mar 18 '19 at 23:14
  • @Brian Rice You may have to go for a work around as discussed in these references. and – skkakkar Mar 19 '19 at 02:37

1 Answers1

0

An escape character escapes the " inside a field, so using ' would (or should) generate:

"{'"abc'":1234}"

However, you could try to use ' as the quote char which should generate:

'{"abc":12,34}'   // if there's a separator in the field

or possibly:

{"abc":1234}      // if there's no separator in the field

Alternatively, if you can be sure there are no comma's inside the fields you could use no quoting at all around the fields.

Danny_ds
  • 11,201
  • 1
  • 24
  • 46