C
C#2mo ago
Wololo

NPOI vs ClosedXML

Hi, I am in search for a library for an application where a user uploads a (potentially very large) excel document and it needs to be processed by the ASP.NET backend (.net 8.0) to process the file that will go into a database. The requirements are that my work would rather not have to install office in the server and would prefer a free library. Some research helped me find these two libraries. Anyone have experience with them that can give a recommendation? Or even for a third library? All input is appreciated
3 Replies
SleepWellPupper
SleepWellPupper2mo ago
I have used ClosedXml to write large data sets to Excel before and it had a nice and usable api. Can't speak to NPOI though.
MarkPflug
MarkPflug2mo ago
I maintain an excel reader library that I specifically designed for easy compatibility with database ingestion. https://github.com/MarkPflug/Sylvan.Data.Excel Here is an example that does SQL bulk import with my csv library, just replace "csv" with "excel" and it should work the same way. https://github.com/MarkPflug/Sylvan/blob/main/docs/Csv/Examples.md#bulk-load-csv-data-into-sqlserver It is an order of magnitude faster than the popular options. Maybe at least give it a try?
GitHub
GitHub - MarkPflug/Sylvan.Data.Excel: The fastest .NET library for ...
The fastest .NET library for reading Excel data files. - MarkPflug/Sylvan.Data.Excel
GitHub
Sylvan/docs/Csv/Examples.md at main · MarkPflug/Sylvan
A collection of .NET libraries, including the fastest general-purpose CSV parser for .NET. - MarkPflug/Sylvan
MarkPflug
MarkPflug2mo ago
GitHub
Benchmarks/docs/ExcelReaderBenchmarks.md at main · MarkPflug/Benchm...
Benchmarks for various .NET libraries. Contribute to MarkPflug/Benchmarks development by creating an account on GitHub.

Did you find this page helpful?