CSV Library to use

At first, I used custom built CSV helper class, which simply separates CSV formatted string with a comma and push the data into DataTable. However, this class didn’t handle double quotation qualifier well enough.

So, I started searching for a CSV library.

One reliable and mostly recommended CSV library was A Fast CSV Reader (aka LumenWorks.Framework.IO) by , but it’s not maintained by Paul Hatcher in Github Repo in the name of CsvReader.

The CsvReader library is an extended version of Sebastian Lorien’s fast CSV Reader project and provides fast parsing and reading of CSV files

by – Paul Hatcher

This was quite good, until I found

  1. CsvReader does not returns the correct row there the CSV format is broken
  2. When there is CR/LF in the middle of CSV data, this library cannot handle it even though the CR/LR is wrapped by double quotation qualifier.

The next one I’ve chosen is DataStreams framework, which can cope with CR/LF in CSV data. Unfortunately, this isn’t open-source.  I’m happy with DataStreams up until now.

Hope to find open source CSV libary that is as stable as DataStreams.

Still, I’m using my first CSVHelper class as a facade / wrapper class for these 3rd party library so as to separate the concern as we normally do.




If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a comment

Your email address will not be published. Required fields are marked *