Remove line breaks in csv using java

1.4k Views Asked by At

I need to check for line breaks in csv for every entry using java. I have no idea how to do it. Can anybody help? thanks!

1

There are 1 best solutions below

0
On

Try this in your java source from which you are reading the csv.

String col = columnName.replaceAll("[\r\n]", "");
reportColumn.put( "column", col );