Closed GoogleCodeExporter closed 9 years ago
Good point. I did not know there were any requirements beyond just being
separated by
a comma! Are you running into an issue with this right now?
Original comment by jeff.johnston.mn@gmail.com
on 12 May 2010 at 2:40
I have write own CsvCellRenderer, where for the content of the cell call
StringEscapeUtils.escapeCsv from org.apache.commons.lang package, and then put
in
the beginning and end of quotes.
Original comment by stas.agarkov
on 12 May 2010 at 10:08
Can you send those changes to me? Sounds like a great improvement!
If so send them to jeff.johnston.mn@gmail.com and I will include it in the next
release.
Original comment by jeff.johnston.mn@gmail.com
on 12 May 2010 at 1:06
public class RfcCsvCellRendererImpl
extends CsvCellRendererImpl {
public RfcCsvCellRendererImpl(Column column, CellEditor cellEditor) {
super(column, cellEditor);
}
@Override
public Object render(Object item, int rowcount) {
StringBuilder data = new StringBuilder();
String property = getColumn().getProperty();
Object value = getCellEditor().getValue(item, property, rowcount);
String stringValue = StringEscapeUtils.escapeCsv(value.toString());
data.append(stringValue);
data.append(getDelimiter());
return data.toString();
}
}
but you need to check not put it StringEscapeUtils quotes. if you put, then
their
second set did not need.
Original comment by stas.agarkov
on 13 May 2010 at 5:49
Putting the value in quotes is now being done by default.
Original comment by jeff.johnston.mn@gmail.com
on 10 Mar 2011 at 9:24
Original issue reported on code.google.com by
stas.agarkov
on 11 May 2010 at 7:10