12

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?
pnuts
  • 58,317
  • 11
  • 87
  • 139
Mikhail Orlov
  • 2,789
  • 2
  • 28
  • 38

1 Answers1

14
  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.

Mikhail Orlov
  • 2,789
  • 2
  • 28
  • 38
  • Why EPPlus for .xlsx if EDR is reading faster, as you said in 3.? – titol Aug 24 '15 at 17:19
  • 1
    @titol Well, because I already had it tested, and also because EDR is faster for very-very large files, about 100 megabytes. For smaller files around 2 megabytes, EPPlus is faster. And it just works, you don't have to wrap EDR's DataSet into own Excel-like data model. – Mikhail Orlov Aug 26 '15 at 08:00