Question

I am using SuperCSV for reading and writing csv files. The problem i am facing is, under Unix/Linux systems, I am getting "^M" character appending to end of each line, which is quite annoying.

How do I handle/fix that.

beanWriter = new CsvBeanWriter(new FileWriter(this.file), CsvPreference.STANDARD_PREFERENCE);
final CellProcessor[] processors = getProcessors();
beanWriter.write(writeBean, header, processors);

part of code how I am exactly using SuperCSV

Was it helpful?

Solution

Like the docs and website say, use CsvPreference.EXCEL_PREFERENCE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top