Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Eric Pugh
    I'm going to try and set up a comparsion... One thing I noticed, super-csv seems rather unhappy if I don't have a header row.....
    Do I need to manulaly in an array make up my own header row? versus using positional information?
    Kasper B. Graversen
    See http://super-csv.github.io/super-csv/examples_reading.html eg ListReader does not require a header
    Eric Pugh
    ah, so the order of the cell processors is the key thing...
    postion 1, 2,3 etc..
    in CSVListReader
    Kasper B. Graversen
    indeed. If you think the documentation is unclear, we'd be happy to receive improvements
    Doug Ilijev
    I think I considered using this library for a project and ended up writing my own "good enough" reader in about 80 lines
    I'd be interested to know of any deficiencies or edge cases I fail, and maybe see about performance. I did this as a character-by-character processors via FSM.
    Of course, I'm sure super-csv is more versatile. But it was complicated enough that I felt my own implementation would be more worth my time.
    So perhaps, try to improve the documentation or reduce the complexity. A few good examples can go a long way.
    Kasper B. Graversen
    @dilijev have you even looked at the home page? there is a ton of documentation and examples. What specifically are you missing?
    Your implementation lack all the stuff SuperCsv offers out of the box in terms of consistency, converting values from strings, reading directly into objects, handling wrongly escaped "-elements
    Doug Ilijev
    I did. Both the README on github and the website were unintuitive. In fact, even knowing that what I'm looking for is present, it has taken me 5 minutes to find the first example, and I don't understand what it is supposed to do.
    With some effort I believe I would be able to understand it. But the API is not immediately simple or straightforward. Not sure what you mean with the consistency issue. And in my case I did not need to read directly into objects. CSV is mostly strings and I was crunching data as strings. Thus, this simple implementation served my purposes.
    I'm not saying this is a bad project by any means. I'm interested in it and I would like to be able to use it in future projects, but it seems to me that it has so many features the API has started to get in the way of itself.
    Kasper B. Graversen
    Thanks for the feedback. I'm puzzled as to your experience. From the "readme" you choose documentation. Then choose "where to begin" under getting started. Then you select help for reading or writing. Then your select eg reading and you are presented with a lot of ways to do reading. But we always welcome pull requests if you want to contribute with making things clearer. Thanks.
    Doug Ilijev
    Alright, I may poke around and see if I can think of a way to make things clearer. I'm working on a project right now which is getting close to release and we want to provide some more complex "real-world" type of examples, one of which might be CSV reading, so we'll give your library a shot.
    Well the instructions you linked take you to a table which is a feature comparison. And the only obvious links are to javadocs, which is a bad way to understand the usability of an API overall. So I assumed I was in the wrong place and kept looking.
    Perhaps have examples specific to each kind of reader, linked next to the titles in that table?
    Kasper B. Graversen
    I was thinking http://super-csv.github.io/super-csv/readers.html where to the left you have "examples" with lots of stuff.
    Hi @kbilsted
    It seems there is a bug in super-csv. When I created beanWriter in the next way:
    ICsvBeanWriter beanWriter = new CsvBeanWriter(new FileWriter(file), CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE)
    I'm expecting that my line in csv file will look like:
    but actual result is the line without quotation mark, like
    Could you please check if it's a bug?
    Petar Tahchiev
    hello, I wanted to ask if it's possible to have a combination of unique columns - say first_name and last_name are not unique, but the combination of first_name and last_name must be unique
    hii sir i m facing a issue in one of the program could u help me
    Veronica Villegas
    Hello! Someone knows which is the maximum amount of rows that I can read using super-csv?
    Doug Ilijev
    I think it just goes row-by-row so it should be bounded only by the memory limit of the JVM

    I want to read 3 crore csv rows which is of 2GB csv file size and need to insert into MySQL via Java.

    Could someone please help me know the fastest and memory efficient way to avoid out of memory exception as well load in lesser time?

    Please kindly advise.