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

Java trying to use SuperCSV to take a string and create a pojo

I might be making this more complicated than it is but I have some code that gives me a CSV as a string. I want to turn that into a pojo for some test code I am writing. I am using SuperCSV beanReader = new CsvBeanReader(new…
ducati1212
  • 201
  • 2
  • 13
0
votes
1 answer

How to configure Super CSV to quote all values except column names?

Requirements are: Every value in records should be quoted. Column names should separated by comma and space(, ). For example Name, Age, Location "A","154","California" "B","2","New York" How do I create such SuperCSV Preference for writing?
Nilesh
  • 2,089
  • 3
  • 29
  • 53
0
votes
1 answer

Java: Trouble with wildcards/generics

I am really struggling with using wildcards/generics. I'm trying to create a FileManager utility class that can accept custom Java Beans and write read/write the bean to a file. Just to give an example imagine I have an interface called Data that is…
Alex Cauthen
  • 497
  • 5
  • 12
  • 32
0
votes
0 answers

How to change a column value in csv dynamically

I have a CSV file like below SoftwareID,SoftwareDescription,SoftwareName,SoftwareVersion,SoftwareLifeCycleStage,SoftwareCodeBase,SoftwareTags,SoftwareSeverity TestSoftware,This is Test…
Lokesh S
  • 31
  • 6
0
votes
1 answer

super csv nested bean

I have a csv id,name,description,price,date,name,address 1,SuperCsv,Write csv file,1234.56,28/03/2016,amar,jp nagar I want to read it and store it to json file. I have created two bean course(id,name,description,price,date) and…
tarun
  • 39
  • 4
0
votes
1 answer

How can I tell SuperCSV that ignore line which has semi-column in it

I am using super CSV to parse CSV file in my portlet. My CSV format is something like as below. ;A,BC,DE ;123 ;xyz ;Instruction ;etc Column1,Col2,col3 Val1,Val2 All I am interested in reading columns and value , I want to ignore anything above that…
Sagar Vyas
  • 583
  • 1
  • 6
  • 11
0
votes
1 answer

adding the error line in log when SuperCSV fails

I'm using SuperCSV to parse a CSV file. It works flawlessly. The CSV file I'm passing may contain some invalid records in it. At that time, is it possible to log which line is not processed? List csvContentsList = new…
RamValli
  • 4,389
  • 2
  • 33
  • 45
0
votes
1 answer

Ignore Quoting while reading CSV using Super CSV

I working a CSV reader project and using Super csv to process csv files. I ran into an issue where the log that I was parsing was using the quote character to denote inches (example: Foo".) This caused me to miss out on processing 100k lines from…
Kiran
  • 921
  • 1
  • 11
  • 23
0
votes
1 answer

How to correctly parse Joda DateTime with SuperCSV?

I'm attempting to parse a date from CSV like this: 2016-03-01 To a Joda DateTime with SuperCSV Dozer, like this: private static final String[] FIELD_MAPPING = new String[] {"date"}; final CellProcessor[] processors = new CellProcessor[] { new…
Polk
  • 1
  • 1
0
votes
1 answer

support for Calendar in SuperCSV

I have a CSV file in this format RES,2016-02-23_18:01:27 and I want to map the values to a bean which has String and Calendar type attributes. While writing the cell processor method, there is method to parse the value into Date as ParseDate(). Here…
RamValli
  • 4,389
  • 2
  • 33
  • 45
0
votes
0 answers

Ignore rows having columns less than number of headers in csv - SuperCSV

I am using SuperCSV to parse CSV records into JavaBean. My CSV files have 10 columns with a headers row in starting. These files can have records up to 10k.I want to process records having equal number of columns with headers . Suppose if a record…
Kiran
  • 45
  • 6
0
votes
2 answers

How to process CSV records in which each field is having multiple constraints

I am working on a requirement where I need to parse CSV file records . Each record can have upto 10 fields and for each field there are multiple constraints(should be required field,alphanumeric,numeric etc). I have to validate each field against…
Kiran
  • 45
  • 6
0
votes
1 answer

Supercsv - unable to find method exception

I have the below implementation. csvReader = new CsvBeanReader(new InputStreamReader(stream), CsvPreference.STANDARD_PREFERENCE); lastReadIdentity = (T) csvReader.read(Packages.class, Packages.COLS); In my Packages.class I have set my unitcount…
Atom
  • 768
  • 1
  • 15
  • 35
0
votes
1 answer

Super CSV Java all data not written into csv

I have a list of size 944, when the data is written into the CSV file, everything is working fine but I see only 940 records. I don't know what is the issue. Can anybody please help me? static void writeCSVFile(String fileName, List
kavitha5
  • 1
  • 2
0
votes
1 answer

Unable to read all values of HashMap although they are all in it

I have a CSV file which I read through a parser like superCSV. I have about 5000 records in it. I am able to put all values in the HashMap and but while iterating through it, it only displays 10 records instead of all of them. What can be the…
user3044240
  • 621
  • 19
  • 33