commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Apache Commons CSV suggestions
Date Wed, 02 Jan 2008 14:33:56 GMT

I would like to suggest a few improvements to the Apache Commons CSV 
project (a few things that I noticed when using it).

1. It seems that CSVWriter.writeRecord() is not writing a 
platform-independent newline sequence. If you open a resulting .csv file
with notepad.exe on a Windows XP machine, it looks like we're missing one 
of the line ending characters. 

2. I was expecting CSVConfig.setFieldHeader(true) to enable the generation 
of the CSV header with the first writeRecord() call, but it did not. I had 
create a separate Map just for this. 

3.  Like some of the other CSV packages out there, I'd like to see special 
handling when each field is written to optionally quote strings with 
special characters. For
example, if my separater is a comma, I should not have to replace all 
occurrences of a comma with a blank before calling writeRecord(). It 
should scan and automatically
quote the data. This would be sweet. 

I like the idea of a CSVConfig class. This is what many of the other 
efforts were lacking...

My $0.02. 

Dwaine Van Bibber
Application Development
(412) 666-3220
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message