Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the common knowledge about NPOI, EPPlus and Koogra as of 2015?

Tags:

excel

epplus

npoi

Yes, Koogra only reads. EPPlus only supports .xlsx and is buggy in edge cases.

  • What else should one know for choosing between them?
  • Is one of them much slower than others?
  • NPOI seems way to complicated and is a Java port, so is it worth using?
  • Should one use EPPlus for .xlsx and NPOI for .xls?
  • What is the general knowledge about them today?
like image 403
Mikhail Orlov Avatar asked Jun 01 '15 12:06

Mikhail Orlov


People also ask

Does EPPlus support XLS?

EPPlus does not work with the XLS format.

Is EPPlus thread safe?

It seems EPPlus Worksheet API is not a thread safe (at least some cell operations). Different worksheets could be processed in parallel, as mentioned here.


1 Answers

  1. Jet/ACE OLE DB either read worksheet as strings, or as typed columns, so you either lose numbers precision or you must have headers in the first row. Thus, they are to be avoided.
  2. No library supports XLSB.
  3. Speed.
    • For a large XLS, the time of reading for NPOI:Jet:Koogra:EDR is 14:8:7:5.
    • For the same XLSX, the time for EPPlus:NPOI:Koogra:EDR is 52:36:20:16.
    • For relatively small files with many tabs EPPlus can be a bit faster than EDR.
  4. Errors (#DIV/0!, #VALUE!) etc.
    • EDR and Koogra don't explicitly support errors. EDR reads them as usual strings, Koogra -- as blank cells.
    • NPOI and EPPlus do.
  5. Koogra reads dates as [OLE date] numbers and they are undistinguishable from real numbers. Also it sometimes reads numbers with many decimals digits incorrectly. EDR gets this fine. So, no to Koogra.
  6. NPOI is complicated, 5 dlls of 4 MB. Koogra and EDR are simple, 200 KB and two dlls (themselves and zip) each.
  7. EDR works as a IDataReader, so it reads data sequentially. It also has built-in function to get a DataSet. With sequential read yoou can only go through first sheet in the work book. Koogra supports random access to cells and sheets.
  8. EDR is based on SharpZip, Koogra is based on Ionic.Zip. The former allows to open a file from .zip a Stream which can be benefical for other parts of the project.

I haven't looked at writing aspects of NPOI, so without the need to distinguish errors, I would go with EPPlus for .xlsx and with EDR for reading .xls.

like image 134
Mikhail Orlov Avatar answered Sep 28 '22 04:09

Mikhail Orlov