NPOI support CSV/TSV?

16.5k Views Asked by At

I'm using the NPOI library with a C# application.

What I'm creating is a reporting system that automatically reads, and extracts data from an excel sheet. I was given a spec, informing me that all reports I needed to ingest in my system were in .xls format however now this appears not to be the case.

I'm wondering is it possible to read in a CSV or TSV file using the NPOI library? I've crawled the web but only seem to be able to find answers relating to the Java version of this library.

Any help would be appreciated, thanks :)

2

There are 2 best solutions below

0
On BEST ANSWER

To read csv files in .Net you should take one of these:

0
On

There isn't much documentation on the NPOI library itself. However, as this is a port from the Apache POI library, you can equally well consult the documentation there. Also, there is example code demonstrating the use of NPOI, which can be found at http://npoi.codeplex.com/releases

Regarding your question: NPOI doesn't handle the CSV format. See: http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html#comment-391471769