Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • I just tested this in excel 2007, and it works correctly for me. However if there is a leading space before the quotes, then it does not parse comma correctly. Commented Jan 27, 2012 at 1:47
  • 10
    This wouldn't appear to be a bug according to RFC 4180. The correct way to quote the field is to quote the whole field and then double quote internal quotes. So "=""field, content""" tools.ietf.org/html/rfc4180 Commented Apr 12, 2012 at 13:29
  • 2
    @PeterStephens, This doesn't work if field, content has "within it. E.g. "=""field, co""ntent""" Commented May 5, 2015 at 4:05
  • 1
    @Pacerier Probably the embedded quote has to be double quoted, turning into """". Commented Nov 19, 2015 at 19:24
  • I can confirm @ErikE's suggestion is correct. For a field with value 1"2, if you choose to use this trick (as opposed to just leaving it be as "1""2" in the file - excel would already have treated is as text), then the final correct string in the Excel-targeting CSV file ends up being "=""1""""2""". Commented Dec 20, 2019 at 18:04