Questions tagged [apache-commons-csv]

Commons CSV reads and writes files in variations of the comma-separated value (CSV) format.

Apache Commons CSV, an open-source Java library for reading and writing text files in various delimited-text formats, including:

114 questions
0
votes
1 answer

Unexpected quoting in Apache Commons CSV

While using Apache CSV with below maven dependency. I am getting unexpected results. org.apache.commons commons-csv 1.2 Simple code is not…
Pratiyush Kumar Singh
  • 1,977
  • 3
  • 19
  • 39
0
votes
1 answer

How to replace a specific row from a CSV file?

Is it possible to access a specific row in a CSV file and replace a specific field in it? E.g. like in this pseudo code: Row row = csvFile.getRow(123); row.getField(2).set("someString"); Tried Apache Commons CSV and OpenCSV, but can't figure out…
ss1
  • 1,009
  • 15
  • 32
0
votes
1 answer

why are classes declared as final in apache commons csv library

Apache commons CSV Parser class throws an exception "EOF reached before encapsulated token finished" for the pseudo code CSVParser csvParser = CSVParser.parse(fileChunkString, CSVFormat.DEFAULT); The reason for the error is my CSV File is parsed…
prasun
  • 7,073
  • 9
  • 41
  • 59
-1
votes
1 answer

How to skip comments in a record

I'm using the Apache Commons CSV 1.9.0 library and to parse a csv file, the problem that I cannot set a comment marker "#" to fill the comment filed in the record so they can be skipped when looping through the file. this is the code I'm…
-1
votes
1 answer

Not able to insert million records from csv file to MySql database

So I wanted to read per say 100 lines and print it and it should be happening for every 100 lines and I don't know where to insert that code. The CSV file with one million records isn't getting inserted into the DB as only few thousand are getting…
-1
votes
1 answer

Reading CSV file using Apache Commons

I want to retrieve CSV file data from two files but in Nested format Here is three files containing server information and getting it into hashmap List list=new ArrayList(); List list1=new ArrayList(); …
Kramer
  • 389
  • 8
  • 34
-1
votes
1 answer

How do I take a "slice" of a List that only has an iterator?

I have a CSV file full of data downloaded from Fitbit. The data inside the CSV file follows a basic format: Here is a small example of the layout of the…
Cache Staheli
  • 3,510
  • 7
  • 32
  • 51
-2
votes
2 answers

Java CSVParser gets empty after reading it

In the snippet below I try to read an excel file by using the CSVParser from the Apache Commons library. The question is why records.getRecords(); makes the list of records empty. How should I be aware of this behavior? import…
Mohammad
  • 41
  • 5
-2
votes
1 answer

How can I save my html parsed data as a CSV file?

I have made all the necessary imports (Jsoup Elements and Element) and the code runs well. I am a beginner and couldn't make the file export properly as a CSV. The data either stays on the same row or the same column. Document document =…
1 2 3 4 5 6 7
8