I have a hashmap with a String key and String value. It contains a large number of keys and their respective values. For example: I would like to write this hashmap to a csv file such that my csv file contains rows as below: I tried the following example here using the supercsv library: http://javafascination.blogspot.com/2009/07/csv-write-using-java.html. However, in this example, you
Tag: supercsv
How to isolate an instance of a class with SuperCsv?
Actually I have a class ArticleModele where I store the content of the columns of the .csv, but I don’t know how to access to a particular instance of the class which corresponds to a particular row in the .csv. Here is my code: And here is the class: Answer The code returns with last result, as it overwrites articleModele.
Unwanted double quotes in generated CSV file
I have created a CSV file using the Java code below: I am getting the CSV file, but the content of the file has unwanted double quotes. Eg. “ABC”,”123″,”KDNJ” I don’t get from where these double quotes are added. Answer This worked for me See the CSVWriter javadoc