Write out CSV with double quote in some column in java2

Pågående Publicerat 6 år sedan Betalades vid leverans
Pågående Betalades vid leverans

I have the following code that when writing csv will split csvbody by comma,

CSVWriter writer = new CSVWriter(new FileWriter(datasheet),

CSVWriter.DEFAULT_SEPARATOR,CSVWriter.NO_QUOTE_CHARACTER);

[login to view URL](csvBody);

but my csvBody which is a List<String[]> looks like

"a","b","c", "e,f,g"

so after splitting, "e,f,g" will be split into three columns without double quote surrounds them, the result will be a,b,c,e,f,g

After write to CSV file I want this kind of format a,b,c,"e,f,g".

Java

Projekt-id: #16892079

About the project

11 offerter Distansprojekt Aktivt 6 år sedan

Tilldelades:

ARKSolution2015

Sir, I have gone through your project description and am looking to provide my service for java work. For more than 7 years I’ve worked in this field.

$25 USD inom 1 dag
(100 omdömen)
6.3

11 frilansare har lagt bud på i genomsnitt $24 för det här jobbet

AhmedLabib93

Hello My name is Ahmed, i'm a top rated freelancer. i worked over 400 projects and over 700 hours doing java projects. plus i passed freelancer java v3 exam with score 3.75 plus i got 2 java certificate 1Z0-803 an Mer

$25 USD inom 1 dag
(414 omdömen)
6.6
urstealth

A proposal has not yet been provided

$20 USD inom 1 dag
(23 omdömen)
4.6
drredict

Before accepting, I would like to clarify: would it be possible to use commons csv instead of opencsv?

$20 USD inom 2 dagar
(1 omdöme)
0.9
XTeamDev

I am working in Java since 20 years. I work for a big company and I can help you without problem. Choose me for this works! Thanks, have a good day

$25 USD inom 1 dag
(0 omdömen)
0.0