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

Limit CSV file size using openCsv StatefulBeanToCSV

I have a list of objects let's say List of Product which I get from my Db. Im able to write those List to a CSV file using openCSV StatefulBeanToCSV writer for 0.5M records it takes less than 10s to write the data to CSV file.. but the problem is…
0
votes
2 answers

Is there a way to skip the header when using CsvBeanReader?

I have a project in which I am supposed to write the object into a CSV file. I am currently using ICsvBeanWriter for it but each time a new record is passed it writes the header as well. It creates issues when reading from the file. Below are…
hatim
  • 3
  • 2
0
votes
1 answer

SuperCSV: BigInteger to String with variable Decimal Places

I'm writing a CSV file using the SuperCSV package. I'm writing my beans using CsvDozerBeanWriter. In my beans I have a BigInteger value and I want to write the csv file to a variable number of decimal places (It is 8 for now). My CellProcessor…
ceen
  • 25
  • 5
0
votes
1 answer

how to write String array in a csv column

public class bean { private String name; private String[] friends; } public void createSuperCSVFile(final List data, final File file) throws IOException { ICsvBeanWriter beanWriter = null; try…
Choesang
  • 1,225
  • 1
  • 14
  • 23
0
votes
1 answer

Does super CSV support parsing a file header?

I have a CSV that has a few file header lines at top. The rest of the rows are in the normal tablular format. Is it possible to parse the header row or process it differently from the remainder of the normal tabular data?
Jawad
  • 193
  • 1
  • 8
0
votes
1 answer

Multiple fields in one cell with SuperCSV

I have one table with some columns: UserID | FirstName | LastName | Email I want to write these columns to a CSV with SuperCSV in JAVA. But I want to write them like this: UserID | FullName | Email I mean that I want to concatenate the first…
frankdart
  • 59
  • 2
  • 10
0
votes
1 answer

Download file in Servlet

I am trying to download a file in a Servlet to the web client. I keep on getting this error. Exception in thread "Thread-5" java.lang.NullPointerException at org.apache.coyote.http11.Http11OutputBuffer.commit(Http11OutputBuffer.java:347) at…
user1163234
  • 2,407
  • 6
  • 35
  • 63
0
votes
1 answer

Ignore unwanted columns using CSVBeanReader

I hope the kind people here can help me with my CSV situation. I only need to read the first 3 columns in the CSV that i'm using. I have no control in the number of columns that the CSV file has and there are no headers available. I tried using the…
ides
  • 369
  • 6
  • 16
0
votes
1 answer

Write HashMap to Csv File

I have a hashmap with a String key and List(String) as values. For Example: Key | Values John | GroupName1,GroupName2,GroupName3 Nick | Groupname4,GroupName1 I would like to write this hashmap to a csv file such that my csv file contains rows as…
0
votes
0 answers

SuperCsvException (nameMapping array and the sourceList should be the same size) Occuring While Converting CSV To Excel File Using CsvMapReader

I am converting csv file to excel using CsvMapReader. But for few files am getting exception as below: Exception in thread "main" org.supercsv.exception.SuperCsvException: the nameMapping array and the sourceList should be the same size…
Gayathri
  • 41
  • 1
  • 8
0
votes
1 answer

Writing CSV files causing JVM crash

In the existing project user can download report and it has 10 million records, this process gets data from database and writes to csv by using super csv java api then sends an email to user by attaching, it takes huge heap space to hold 10 million…
Ramesh
  • 45
  • 1
  • 9
0
votes
0 answers

Parsing CSV String Using supercsv

I have been having a hard time parsing this csv string using supercsv. " 00751016" "AUTH " " 19.81" " " " " "WA CONSTRUCTION LTD " "GHS" " 19.81" " …
0
votes
2 answers

Does Aws update bill back in time?

I am programatically downloading aws bill from s3 bucket,parsing all line items and processes them. I am doing this process daily by remembering a marker based on timestamp of last lineitem in the bill. So, in the next run, I will process only the…
Manohar
  • 127
  • 12
0
votes
0 answers

Extending supercsv cell processor implementation generate warning

Extending some Super CSV cell processor generates unchecked warning. For example: package test; import org.supercsv.cellprocessor.FmtNumber; public class CustomFmtNumber extends FmtNumber { public CustomFmtNumber(String formatter) { …
ilvez
  • 1,235
  • 3
  • 16
  • 27
0
votes
0 answers

How do I submit a new CellProcessor for inclusion in Super CSV?

I've written a simple custom CellProcessor for use with Super CSV. It wraps the cell output to prevent losing leading zeroes when the CSV is opened in Excel. For example, if the field is a zip code like this... 08330, Excel will normally convert it…
krick
  • 163
  • 1
  • 5
  • 17