I\'m using opencsv and want to write to a .csv file through multiple sessions. However every time I start a new CSVWriter the old file gets erased. Can I change
.csv
It should be possible:
FileWriter w = new FileWriter("yourfile.csv") CSVWriter writer = new CSVWriter(w, '\t'); ... writer.flush(); CSVWriter writer2 = new CSVWriter(w, '\t'); ... writer2.flush(); w.close();
The CSV tool from the H2 database (disclaimer: I wrote it) also supports this.