开发者

NPOI support CSV/TSV?

开发者 https://www.devze.com 2023-02-12 09:28 出处:网络
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 giv开发者_运维知识库en a spec, infor

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 giv开发者_运维知识库en 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 :)


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

  • CsvHelper
  • A Fast CSV Reader
  • FileHelpers Library


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号