I am reading from table and writing to CSV file using CSVWriter in JAVA. My delimiter is 'control-A' . But one column is having spaces in comments. So how to remove that spaces from value while writing to CSV file.
My code is
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("query");
CSVWriter writer = new CSVWriter(new FileWriter(filePath + "File_writerCSV.csv"),'\u0001');
writer.writeAll(rs,false);
writer.close();
string.replace(',', ' '). But I think you should rather use an delimiter like$$$$$