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
2
votes
1 answer

Adding columns to existing csv file using super-csv

I admit I am not a great Java programmer and probably my question is pretty dumb.I need to add new columns in different places to an existing csv file. I'm using the super-csv library. My input file is something like that 1,2011-5-14…
Any
  • 75
  • 2
  • 9
2
votes
1 answer

Excel does not display umlaut characters in CSV file created with Super CSV

I am using Super CSV for creating CSV file. When I write special characters like umlaut characters ï or î then it breaks in the generated CSV when I open it using Excel. When I open the same file using Notepad++ it shows the umlaut characters…
Lijo wilson
  • 33
  • 1
  • 7
2
votes
1 answer

Super CSV and multiple bean mapping

I came across a problem mapping multiple beans with Super CSV. I got a csv file, containing information for multiple beans (per line). But as I can see from examples on the website it is only possible to map each line into one bean (not into two or…
Daniel
  • 835
  • 1
  • 7
  • 18
2
votes
1 answer

Is there a workaround for Optional ParseDate SuperCsvCellProcessorException in SuperCSV?

I'm using SuperCSV in java to read a csv file. I have a column containing dates but the records may not be populated so I set it to optional. In my CellProcessor I define the field as ..., new Optional(new ParseDate("MM/dd/yyyy",true)), …
ABC123
  • 1,037
  • 2
  • 20
  • 44
2
votes
2 answers

Official supercsv dozer example does not work with Play — Play 2.1.1, Java

Update: Now I found out something very strange, it works when i put the compiled test classes directly into the "super-csv-dozer-2.1.0.jar" with the same structure as in the svn repo. But as soon as i use my own package it wont work. I always used…
Jan P
  • 45
  • 10
2
votes
1 answer

Case-insensitive headers in SuperCSV writer?

Using CsvMapWriter if I add a header say, 'Region' and later write a row with key 'region' and value 'Northeast' it doesn't get added to the SuperCSV output. I'm assuming it doesn't find a valid column to put the value for 'region' in. For this…
xref
  • 1,707
  • 5
  • 19
  • 41
2
votes
2 answers

How to read in a csv with multiple columns with SuperCSV

I have a CSV file containing 2 columns (1 containing a list of words, another with the frequency they are used in a text document). I was curious the best way to read that in an ArrayList of type object using SuperCSV. Thanks in advance.
2
votes
2 answers

Ignore extra columns in csv - SuperCSV

I am using SuperCSV to parse CSV records into Object. My CSV files have extra column in the end and I want to process only first X columns. So I define String[] mapping for first X columns and CellProcessor[] of same size. But it does not seem to…
RandomQuestion
  • 6,778
  • 17
  • 61
  • 97
2
votes
1 answer

Parsing SuperCsv/beanreader encounters exception on first line and return NULL

I try to parse a csv file using Supercsv. I use some "catch exception" to eliminate row with wrong structure or data. All lines are processed through a do / while loop. But if the first line causes an exception (regular expression...) the return…
Efhache
  • 167
  • 3
  • 12
2
votes
1 answer

Suggestions for find and reporting duplicate lines in csv

I have multiple projects that contain varying number of csv files for which I'm using SuperCSV CsvBeanReader to perform the mapping and cell validation. I have created a bean per csv file and overide; equals, hashCode and toString for each bean. I…
2
votes
1 answer

Custom bean instantiation with Super CSV

CSVBeanReader exposes methods for reading a bean of given type. Is there a way to pass an actual object instance rather than the object type (i.e. to customize bean instantiation)?
lku
  • 21
  • 1
2
votes
1 answer

Hadoop with supercsv

I have to process data in very large text files(like 5 TB in size). The processing logic uses supercsv to parse through the data and run some checks on it. Obviously as the size is quite large, we planned on using hadoop to take advantage of…
Nikhil Das Nomula
  • 1,863
  • 5
  • 31
  • 50
2
votes
1 answer

Unreadable output from SuperCSV?

I have a utility class I created for my Spring controller to invoke to generate a CSV from a collection of beans using the SuperCSV library ( http://supercsv.sourceforge.net/ ) The utility class is pretty basic: public static void…
Raevik
  • 1,945
  • 9
  • 32
  • 53
1
vote
2 answers

Read Specific line using SuperCSV

Is it possible to read a specific line using SuperCsv? Suppose a .csv file contains 100 lines and i want to read line number 11.
prasun
  • 63
  • 8
1
vote
2 answers

Java CSV Reader/Writer Questions

I have some questions regarding reading and writing to CSV files (or if there is a simpler alternative). Scenario: I need to have a simple database of people and some basic information about them. I need to be able to add new entries and search…
Jasard
  • 415
  • 1
  • 7
  • 17