Questions tagged [supercsv]

Super CSV is a fast and free open-source CSV API for Java.

Super CSV is a fast and free open-source CSV API for Java, written by Kasper Graversen.

The developers of Super CSV follow this tag, so you can receive expert advice on your Super CSV problems by using this tag.

Before asking a question, check the documentation and examples on the project website.

Please note that you can also receive help at the project's GitHub site, as well as report any issues you have encountered.

Related Links:

202 questions
0
votes
1 answer

Custom error message for a cell-processor in SuperCSV?

I'm using SuperCSV-2.3.1. Is it possible to have a custom error msg to attach to a cell-processor, so when it fails validation, we get the custom msg in the exception? Thanks.
pka
  • 183
  • 6
  • 13
0
votes
1 answer

Supercsv generates exception

My use case is reading objects from a CSV, performing some modifications on the objects, then writing them to another CSV. I've attempted to modify the supercsv examples as below, but am getting a SuperCsvConstraintViolationException that I'm not…
fred
  • 1,812
  • 3
  • 37
  • 57
0
votes
1 answer

How to import super-csv-joda to use DateTime processor

I'm currently using super-csv to read/write csv file from Java application. Now, I need to deal with Joda DateTime object. I see that there is a super-csv-joda module, but I can't found information about how to use it. I tried to download it from…
Farid M
  • 35
  • 5
0
votes
1 answer

Formatting header field for bean generator - Java

I have written a program that parses a csv file and creates a bean from the data to be put into a database. Everything works perfectly however now that this will be moved out of a testing environment, the real header names from the csv's will have…
jmpman
  • 23
  • 1
  • 13
0
votes
1 answer

Seemingly random StringIndexOutOfBoundsException in supercsv

I am using a supercsv library in my scala code for (row <- readyData) { // tried foreach and map too listWriter.write(row) } where readyData is Seq[java.util.List[String]] and listWriter is a CsvListWriter. I am sometimes…
Yar
  • 629
  • 6
  • 17
0
votes
1 answer

org.supercsv.exception.SuperCsvCellProcessorException: the input value should be of type java.lang.String but is java.util.Date

I'm using SuperCsv to parse a csv file into Javabeans which I then save in a DB table. I get the following exception when trying to input the date column. After reading the superscv API and documetation I really can't understand how to correctly…
jay tai
  • 419
  • 1
  • 17
  • 35
0
votes
1 answer

Using Tomcat 7 and SuperCSV - in generated and downloaded files non-English characters are all replaced with "?"

What could be causing this, and how can I correct it? The pom.xml includes the line "utf-8".
Sophie
  • 461
  • 1
  • 4
  • 12
0
votes
1 answer

How to append data to File using SuperCSV using CsvListWriter

I have a method to write data to a file. public void writeCSFFileData(List fileData){ try { CsvListWriter csvWriter = new CsvListWriter(new FileWriter("/path/file.csv"), CsvPreference.STANDARD_PREFERENCE); …
Rohith
  • 43
  • 2
  • 10
0
votes
1 answer

Skip comments & surroundingSpacesNeedQuotes with supercsv 2.2.0

I would ignore comments start with '#' char and surrounding spaces with quotes but with opencsv 2.2.0 does not work. I searched into the source of supercsv but the skip comment feature preference it never used into the code. Can you help me ? Thanks…
0
votes
1 answer

ReadOnly column for CSV

Am using SuperCSV to write my table data into a csv file. Somehow now i need to make the first column of csv not editable (read-only). Couldn't find anything specific. Is there a way to do that?
pranav
  • 421
  • 1
  • 11
  • 27
0
votes
1 answer

Remove decimal values in supercsv

I have following CellProcessor method private static CellProcessor[] getProcessors() { final CellProcessor[] processors = new CellProcessor[] { new NotNull(), // senderId new NotNull(), // orderId new…
Min Naing Oo
  • 1,085
  • 5
  • 24
  • 49
0
votes
2 answers

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: public static…
0
votes
2 answers

UnsupportedOperationException When Adding Null to ArrayList

I am trying to add null elements to an ArrayList. This is for the purpose of ignoring columns using supercsv: http://supercsv.sourceforge.net/examples_partial_reading.html I am processing multiple csv files which have different number of header…
ABC123
  • 1,037
  • 2
  • 20
  • 44
0
votes
2 answers

Load a CSV template and write data to it via java

I have a CSV template file, say, having 10 columns. I would like to load this CSV file template, and then write data to the relevant cells(say only to 5 of the 10 cells) through a java program. I went through JSAPAR, SuperCSV etc, but am not sure…
active_coder
  • 79
  • 1
  • 2
  • 13
0
votes
1 answer

Unable to read the data back properly

I am trying to persist a person class which has a list of pets to a CSV file and read it back to the corresponding objects. I am able to write it properly but unable to read. Please see below - Person.java import java.util.ArrayList; import…
Rtn9
  • 101
  • 10