commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tridib Samanta" <>
Subject [CSV] Double quote not escaped properly for EXCEL strategy
Date Thu, 03 Sep 2009 16:19:27 GMT
Hi Friends,

I am using Commons CSV to generate a CSV file. But, if the value contains
double quote, it's been escaped by \ (back slash). But for Excel, it should
be escaped by another double quote.
Here is my code:

        CSVPrinter printer = new CSVPrinter(writer);
        printer.println(new String[]{"c", "234", "\""});

Output generated is:

But for Excel I expect:

Can anybody fix this in the CSV code base please? I want it to be part of
the standard library instead of making changes locally.

Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message