MiniExcel 1.41.3

This project is part of the .NET Foundation and operates under their code of conduct.


Introduction

MiniExcel is simple and efficient to avoid OOM's .NET processing Excel tool.

At present, most popular frameworks need to load all the data into the memory to facilitate operation, but it will cause memory consumption problems. MiniExcel tries to use algorithm from a stream to reduce the original 1000 MB occupation to a few MB to avoid OOM(out of memory).

image

Features

  • Low memory consumption, avoid OOM (out of memory) and full GC
  • Supports real time operation of each row of data
  • Supports LINQ deferred execution, it can do low-consumption, fast paging and other complex queries
  • Lightweight, without Microsoft Office installed, no COM+, DLL size is less than 400KB
  • Easy API style to read/write/fill excel

Get Started

Installation

You can install the package from NuGet

Release Notes

Please Check Release Notes

TODO

Please Check TODO

Performance

The code for the benchmarks can be found in MiniExcel.Benchmarks. To run all the benchmarks use:

dotnet run -project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -filter * --join

Hardware and settings used are the following:

BenchmarkDotNet v0.15.0, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.300
  [Host]   : .NET 9.0.5 (9.0.525.21509), X64 RyuJIT AVX2
  ShortRun : .NET 9.0.5 (9.0.525.21509), X64 RyuJIT AVX2

Import/Query Excel

The file used to test performance is Test1,000,000x10.xlsx, a 32MB document containing 1,000,000 rows * 10 columns whose cells are filled with the string "HelloWorld".

Method Mean StdDev Error Gen0 Gen1 Gen2 Allocated
'MiniExcel QueryFirst' 63.70 μs 0.337 μs 6.144 μs 2.9297 2.7669 - 49.67 KB
'ExcelDataReader QueryFirst' 5,010,679.51 μs 53,245.186 μs 971,390.400 μs 105000.0000 333.3333 - 1717272.56 KB
'MiniExcel Query' 9,172,286.91 μs 12,805.326 μs 233,616.824 μs 448500.0000 4666.6667 - 7327883.36 KB
'ExcelDataReader Query' 10,609,617.09 μs 29,055.953 μs 530,088.745 μs 275666.6667 68666.6667 - 4504691.87 KB
'Epplus QueryFirst' 13,770,656.24 μs 45,909.809 μs 837,565.827 μs 174333.3333 88833.3333 4333.3333 3700587.76 KB
'Epplus Query' 19,257,306.83 μs 63,117.956 μs 1,151,506.486 μs 452333.3333 90500.0000 5333.3333 8223933.16 KB
'ClosedXml Query' 31,070,263.83 μs 342,973.671 μs 6,257,116.502 μs 401666.6667 104166.6667 3333.3333 6822559.68 KB
'ClosedXml QueryFirst' 31,141,877.48 μs 21,006.538 μs 383,237.459 μs 402166.6667 104833.3333 3833.3333 6738357.8 KB
'OpenXmlSDK QueryFirst' 31,750,686.63 μs 263,328.569 μs 4,804,093.357 μs 374666.6667 374500.0000 3166.6667 6069266.96 KB
'OpenXmlSDK Query' 32,919,119.46 μs 411,395.682 μs 7,505,388.691 μs 374666.6667 374500.0000 3166.6667 6078467.83 KB

Export/Create Excel

Logic: create a total of 10,000,000 "HelloWorld" cells Excel document

Method Mean StdDev Error Gen0 Gen1 Gen2 Allocated
'MiniExcel Create Xlsx' 4.427 s 0.0056 s 0.1023 s 251666.6667 1833.3333 1666.6667 3.92 GB
'OpenXmlSdk Create Xlsx by DOM mode' 22.729 s 0.1226 s 2.2374 s 307000.0000 306833.3333 3833.3333 6.22 GB
'ClosedXml Create Xlsx' 22.851 s 0.0190 s 0.3473 s 195500.0000 54500.0000 4166.6667 4.48 GB
'Epplus Create Xlsx' 23.027 s 0.0088 s 0.1596 s 89000.0000 17500.0000 6000.0000 2.51 GB

Warning: these results may be outdated. You can find the benchmarks for the latest release here.

Documents

https://github.com/mini-software/MiniExcel

Showing the top 20 packages that depend on MiniExcel.

Packages Downloads
Quantum.Framework.Core.StandardLib
Package Description
38
Quantum.Framework.Core.StandardLib
Package Description
39
Quantum.Framework.Core.StandardLib
Package Description
40
Quantum.Framework.Core.StandardLib
Package Description
43
Quantum.Framework.Core.StandardLib
Package Description
44
Quantum.Framework.Core.StandardLib
Package Description
46
Quantum.Framework.Core.StandardLib
Package Description
48
Quantum.Framework.Core.StandardLib
Package Description
56
Quantum.Framework.Core.StandardLib
Package Description
57
Quantum.Framework.Core.StandardLib
Package Description
60
Quantum.Framework.Core.StandardLib
Package Description
68
Quantum.Framework.Core.StandardLib
Package Description
86
Quantum.Framework.Core.StandardLib
Package Description
89
Quantum.Framework.Core.StandardLib
Package Description
121

Please Check [Release Notes](https://github.com/mini-software/MiniExcel/tree/master/docs)

.NET Framework 4.5

  • No dependencies.

.NET 8.0

  • No dependencies.

.NET 9.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
1.41.3 2 06/24/2025
1.41.2 5 05/24/2025
1.41.1 7 04/28/2025
1.41.0 7 04/29/2025
1.40.1 7 04/22/2025
1.40.0 7 04/11/2025
1.39.0 8 03/25/2025
1.38.0 8 03/16/2025
1.37.0 12 01/28/2025
1.36.1 9 01/28/2025
1.36.0 13 12/27/2024
1.35.0 13 11/24/2024
1.34.2 15 11/25/2024
1.34.1 18 11/29/2024
1.34.0 17 12/02/2024
1.33.0 16 12/02/2024
1.32.1 16 11/29/2024
1.32.0.5-quantumdev 149 07/15/2024
1.32.0.4-quantumdev 114 06/19/2024
1.32.0.3-quantumdev 28 06/18/2024
1.32.0.2-quantumdev 36 06/11/2024
1.32.0.1-quantumdev 22 06/07/2024
1.32.0 12 11/28/2024
1.31.3 26 01/27/2024
1.31.2 94 12/15/2023
1.31.0 17 11/29/2024
1.30.3 16 11/29/2024
1.30.2 16 11/11/2024
1.30.1 17 11/28/2024
1.30.0 13 11/29/2024
1.29.0 23 02/01/2023
1.28.5 14 12/02/2024
1.28.4 21 11/26/2024
1.28.2 13 12/06/2024
1.28.1 16 12/06/2024
1.28.0 16 12/02/2024
1.27.0 19 12/02/2024
1.26.7 21 11/26/2024
1.26.6 14 11/11/2024
1.26.5 15 12/09/2024
1.26.4 17 12/06/2024
1.26.3 19 12/10/2024
1.26.2 20 12/02/2024
1.26.1 17 12/10/2024
1.26.0 14 12/10/2024
1.24.2 16 12/08/2024
1.24.1 19 11/12/2024
1.24.0 13 11/30/2024
1.23.2 17 11/29/2024
1.23.1 17 11/30/2024
1.22.0 15 11/12/2024
0.21.5 14 12/02/2024
0.21.4 21 11/29/2024
0.19.1 13 12/02/2024
0.19.0 16 11/28/2024
0.18.0 15 11/28/2024
0.17.5 15 11/11/2024
0.17.4 14 11/29/2024
0.17.2 13 11/25/2024
0.17.1 20 11/27/2024
0.17.0 18 11/28/2024
0.16.1 17 11/27/2024
0.16.0 13 11/12/2024
0.15.5 17 11/30/2024
0.15.4 17 11/12/2024
0.15.2 18 12/01/2024
0.15.1 20 11/12/2024
0.14.8 16 11/29/2024
0.14.7 13 11/26/2024
0.14.6 14 12/06/2024
0.14.5 15 12/02/2024
0.14.4 14 11/27/2024
0.14.3 16 11/30/2024
0.14.2 17 12/06/2024
0.14.1 18 11/27/2024
0.14.0 20 11/27/2024
0.13.5 17 11/16/2024
0.13.4 16 11/28/2024
0.13.3 19 11/07/2023
0.13.2 15 11/26/2024
0.13.1 17 11/27/2024
0.13.0 15 11/17/2024
0.12.2 18 11/28/2024
0.12.1 15 11/26/2024
0.12.0-beta 18 11/27/2024
0.11.1 14 12/14/2024
0.11.0 16 11/28/2024
0.10.3 18 11/11/2024
0.10.2 15 11/30/2024
0.10.1 21 11/12/2024
0.10.0 16 12/11/2024
0.9.1 17 11/11/2024
0.9.0 17 12/11/2024
0.8.0 12 12/14/2024
0.7.0 14 12/14/2024
0.6.0 16 12/11/2024
0.5.0 14 11/27/2024
0.4.0 17 11/24/2024
0.3.0 14 11/26/2024
0.2.3 14 11/27/2024
0.2.2 14 11/27/2024
0.2.1 12 11/25/2024
0.2.0 19 11/27/2024
0.1.0-preview 15 11/12/2024
0.0.7-beta 14 11/11/2024
0.0.6-beta 18 11/12/2024
0.0.5-beta 12 11/26/2024
0.0.4-beta 18 11/14/2024
0.0.3-beta 13 11/27/2024
0.0.2-beta 13 11/12/2024
0.0.1-beta 22 11/12/2024