Reputation: 2492
This is my code for writing a csv file
CSVWriter writer = new CSVWriter(new FileWriter("test.csv",false));
String [] details = new String[]{"00000002","0","0","0","0","type_detils","01","1","-1","0.0","0.0","CST"};
writer.writeNext(details);
I want to write this value format in csv:
00000002,0,0,0,0,"type_detils",01,1,-1,0.0,0.0,"CST"
But when I look in the file it's like this:
"00000002","0","0","0","0","type_detils","01","1","-1","0.0","0.0","CST"
How can I change the string value to an integer during the file write using opencsv?
Upvotes: 2
Views: 4615