Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it.
A quick google has found http://flatpack.sourceforge.net/ which looks promising.
I just wanted to check what others are using before I couple myself to this API.
I've used OpenCSV in the past.
import au.com.bytecode.opencsv.CSVReader;
String fileName = "data.csv"; CSVReader reader = new CSVReader(new FileReader(fileName ));
// if the first line is the header
String[] header = reader.readNext();
// iterate over reader.readNext until it returns null
String[] line = reader.readNext();