Answer the question
In order to leave comments, you need to log in
How to write quotes \" to excel file using CSVPrinter?
When writing a row to an excel file, I use CSVPrinter, respectively with the "EXCEL" format.
output = new OutputStreamWriter(
new FileOutputStream("so_spp_personorg_" + settings.getReplicaIdSpP().toLowerCase() + ".csv", true), "Windows-1251");
writers.add(writerSpPPersonOrg = new CSVPrinter(output, CSVFormat.EXCEL));
line = new StringBuilder("MigrationId=\"" + orgId + settings.getReplicaIdSpO() + "\"" + ";_;_;_;_; ;_;_;_;_;_;улица,");
row = line.toString().split(",");
writerSpOAddrdataOrgf.printRecord(row);
"MigrationId=\"" + orgId + settings.getReplicaIdSpO() + "\"" // Должно быть в одной ячейке
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question