views:

328

answers:

3

I was using opencsv which seemed fine but from the looks of the website it's gone so it's time to look for a new library to deal with parsing CSVs it is a simple task but I would like to keep it with a utility not have to roll my own or maintain one by myself. What is the best alternative?

Seems like the opencsv site was updated and is still active so it is still a viable option.

+3  A: 

Personally I'd not be able to resist the innate programmer desire to roll my own.

Guess it depends on how much time you have. There are several answers on SO that identify such libraries:

http://stackoverflow.com/questions/200609/can-you-recommend-a-java-library-for-reading-and-possibly-writing-csv-files

http://stackoverflow.com/questions/101100/csv-api-for-java

Tom Duckering
+1 for the list of duplicate questions
Thilo
So it seems I can't search worth anything.
Jeff Beck
+1  A: 

No experience with either (still using hand-rolled), but there are (at least)

  1. Commons CSV (Sandbox)

  2. Skife CSV

  3. opencsv

  4. GenJava-CSV

  5. Super Csv

  6. JavaCSV

  7. CSVBeans

Thilo
A: 

Being the author of SuperCSV, my views are probably tainted somewhat ;) I think the major lesson learned from developing SuperCSV is, that CSV handling typically involves much more than just reading a file into a string[][]. Typically you need all kinds of validation and conversion for real life production scenarios.. And I feel that SuperCSV with its concept of CellProcessor empowers the programmer to combine conversions and validations already supplied in the framework, with homegrown conversions and validations.

kbg