Search code examples
csvsupercsv

How to partially read a CSV file with Super CSV


I have a csv file with 24 columns. Out of these I only want to read 3 columns. I see that super CSV is a very powerful library, but I can't figure out how to partially read a CSV. The link that have on partial reading is broken.

Please do help me out with a working example.


Solution

  • Update: SourceForge is back online! The Super CSV site should work now :)

    That's the correct link, but SourceForge project websites are down right now (according to the SourceForge blog):

    Starting at 12:59 UTC today, we experienced a site outage, causing general connectivity issues sitewide. At 15:12 UTC, site connectivity was restored and most services, including downloads, are now back online. Some services are however are offline while we continue to diagnose and determine the root cause for this issue. The services still offline are:

    Project web (ie., projectname.sourceforge.net pages) and associated shell and database services. This also includes access through sftp, scp, and rsync via ssh.

    So you have a few options:

    • view the source code of the reading example on SourceForge (this part of SF is still working). There's a link to download the file at the top left.

    • check out the project source from subversion (you can view/run the reading example listed above to see how it works, or you can even run mvn site:site to generate the project website locally

    • view the cached page from Google

    I hope you enjoy using Super CSV - if you have any other questions feel free to post them here on SO, or on the project help forum on SourceForge.