Open GoogleCodeExporter opened 8 years ago
I would like to know how to do this as well. It's a great CSV utility, but I
want to also supply headers to CSVs that I write.
Original comment by acsta...@gmail.com
on 8 Dec 2014 at 7:58
[deleted comment]
This lib doesn't support headers yet, so you must provide them to your writer
like this.
StringWriter sw = new StringWriter();
//Add the header row
sw.write("col1;col2;col3\n");
CSVWriter csvWriter = new CSVWriterBuilder(sw)
.entryConverter(new MyConverter()).strategy(
new CSVStrategy('\t', '\"', '#', false, true)).build();
csvWriter.writeAll(editors);
String csvData = sw.toString();
Original comment by yuumei...@gmail.com
on 24 Feb 2015 at 2:22
Original issue reported on code.google.com by
joe.osow...@gmail.com
on 7 Feb 2013 at 5:46