java - Including comma in CSV file -


i working on importing data in csv file. stuck on deciding variable needs added field comma separated. below data -

 "acnumber","date","code"   12332,123  09/12/2012 1231 

this desired format. how shows

  "acnumber","date","code"   12332        123   09/12/2012 ... 

actual data being sent string & in format below -

"12332,13321","08/08/2016","1234" 

i have tried below following possible solutions -

1) surrounding code quotes suggested here

""12332,13321"" 

i have added 2 double quotes value covered in quotes.i have tried single double quotes well.

2) use of escape ("\") before comma in final output string

 "12332\,13321" 

i have googled on , still didn't found solution.kindly help.

if want escape separator comma here supposed put content between double quotes if have 12332,123 should put "12332,123" in csv file.

if want escape content between double quotes have put between 2 new double quotes gives 3 double quotes in total if have "12332,13321" should put """12332,13321"""


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -