MiniExcel 1.41.3

Prefix Reserved
dotnet add package MiniExcel --version 1.41.3
                    
NuGet\Install-Package MiniExcel -Version 1.41.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MiniExcel" Version="1.41.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MiniExcel" Version="1.41.3" />
                    
Directory.Packages.props
<PackageReference Include="MiniExcel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MiniExcel --version 1.41.3
                    
#r "nuget: MiniExcel, 1.41.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=MiniExcel&version=1.41.3
                    
Install MiniExcel as a Cake Addin
#tool nuget:?package=MiniExcel&version=1.41.3
                    
Install MiniExcel as a Cake Tool

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (125)

Showing the top 5 NuGet packages that depend on MiniExcel:

Package Downloads
GuoKun.CPS

国坤CPS库

BootstrapBlazor.TableExport

Bootstrap UI components extensions of export

DH.MiniExcel

基于DH框架的Excel处理库。基于https://github.com/mini-software/MiniExcel

TXQ.Utils

Package Description

Wologic.SYS.Application

公司内部自用

GitHub repositories (10)

Showing the top 10 popular GitHub repositories that depend on MiniExcel:

Repository Stars
Scighost/Starward
Game Launcher for miHoYo - 米家游戏启动器
dotnetcore/Magicodes.IE
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
izhaorui/Zr.Admin.NET
🎉ZR.Admin.NET是一款前后端分离的、跨平台基于RBAC的通用权限管理后台。ORM采用SqlSugar。前端采用Vue、AntDesign,支持多租户、缓存、任务调度、支持统一异常处理、接口限流、支持一键生成前后端代码,支持动态国际化翻译(Vue3),等诸多黑科技,代码简洁易懂、易扩展让开发更简单、更通用。
xunkong/xunkong
记录旅途中发生的事
colinin/abp-next-admin
这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
VladislavAntonyuk/MauiSamples
.NET MAUI Samples
ThingsGateway/ThingsGateway
ThingsGateway is a cross platform high-performance edge acquisition gateway based on Net8, providing underlying PLC communication libraries, communication debugging software, and more.
842549829/Panda
Abp.vNext + EF Core The microservices Open source framework project supports the implementation of message push workflow certification centers based on OAuth2.0
zmrid/iMES-Factory
iMES工厂管家——您的新一代工厂助手。演示地址:https://imes.625sc.com。 一款基于.NetCore3.1和Vue3的MES管理系统。项目亮点:模版打印,Excel模版导出,自定义实体扩展,移动端精美设计,大屏设计等功能。
densen2014/BlazorMaui
用 c # 和 Razor 创建本机移动应用和桌面应用。使用 Blazor.BB.Maui,可以快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS 的应用。
Version Downloads Last updated
1.41.3 0 13 hours ago
1.41.2 47,156 a month ago
1.41.1 46,616 2 months ago
1.41.0 24,198 2 months ago 1.41.0 is deprecated because it is no longer maintained and has critical bugs.
1.40.1 2,364 2 months ago 1.40.1 is deprecated because it is no longer maintained and has critical bugs.
1.40.0 25,207 2 months ago 1.40.0 is deprecated because it is no longer maintained and has critical bugs.
1.39.0 61,364 3 months ago
1.38.0 127,292 4 months ago
1.37.0 50,166 5 months ago
1.36.1 18,111 5 months ago
1.36.0 93,758 6 months ago
1.35.0 119,246 7 months ago
1.34.2 290,199 9 months ago
1.34.1 128,965 8/10/2024
1.34.0 105,148 7/21/2024
1.33.0 60,344 7/7/2024
1.32.1 170,388 5/16/2024
1.32.0 25,765 5/12/2024
1.31.3 515,055 12/27/2023 1.31.3 is deprecated because it is no longer maintained.
1.31.2 855,742 8/10/2023 1.31.2 is deprecated because it is no longer maintained.
1.31.0 285,460 5/28/2023 1.31.0 is deprecated because it is no longer maintained.
1.30.3 106,596 5/1/2023 1.30.3 is deprecated because it is no longer maintained.
1.30.2 564,624 2/21/2023 1.30.2 is deprecated because it is no longer maintained.
1.30.1 39,725 2/7/2023 1.30.1 is deprecated because it is no longer maintained.
1.30.0 194,522 12/27/2022 1.30.0 is deprecated because it is no longer maintained.
1.29.0 195,388 11/9/2022 1.29.0 is deprecated because it is no longer maintained.
1.28.5 21,123 10/30/2022 1.28.5 is deprecated because it is no longer maintained.
1.28.4 3,660 10/29/2022 1.28.4 is deprecated because it is no longer maintained.
1.28.2 3,661 10/29/2022 1.28.2 is deprecated because it is no longer maintained.
1.28.1 26,226 10/22/2022 1.28.1 is deprecated because it is no longer maintained.
1.28.0 72,344 9/19/2022 1.28.0 is deprecated because it is no longer maintained.
1.27.0 4,433 9/18/2022 1.27.0 is deprecated because it is no longer maintained.
1.26.7 11,787 9/9/2022 1.26.7 is deprecated because it is no longer maintained.
1.26.6 11,572 9/4/2022 1.26.6 is deprecated because it is no longer maintained.
1.26.5 299,421 6/30/2022 1.26.5 is deprecated because it is no longer maintained.
1.26.4 7,525 6/26/2022 1.26.4 is deprecated because it is no longer maintained.
1.26.3 229,463 6/7/2022 1.26.3 is deprecated because it is no longer maintained.
1.26.2 225,643 4/21/2022 1.26.2 is deprecated because it is no longer maintained.
1.26.1 11,173 4/17/2022 1.26.1 is deprecated because it is no longer maintained.
1.26.0 219,103 4/12/2022 1.26.0 is deprecated because it is no longer maintained.
1.24.2 3,977 3/17/2022 1.24.2 is deprecated because it is no longer maintained.
1.24.1 5,569 3/15/2022 1.24.1 is deprecated because it is no longer maintained.
1.24.0 15,609 3/9/2022 1.24.0 is deprecated because it is no longer maintained.
1.23.2 8,192 3/4/2022 1.23.2 is deprecated because it is no longer maintained.
1.23.1 226,898 2/14/2022 1.23.1 is deprecated because it is no longer maintained.
1.22.0 4,017 2/12/2022 1.22.0 is deprecated because it is no longer maintained.
0.21.5 34,955 2/7/2022 0.21.5 is deprecated because it is no longer maintained.
0.21.4 9,113 1/27/2022 0.21.4 is deprecated because it is no longer maintained.
0.19.1 280,549 11/15/2021 0.19.1 is deprecated because it is no longer maintained.
0.19.0 14,104 10/21/2021 0.19.0 is deprecated because it is no longer maintained.
0.18.0 17,687 9/13/2021 0.18.0 is deprecated because it is no longer maintained.
0.17.5 248,247 8/20/2021 0.17.5 is deprecated because it is no longer maintained.
0.17.4 5,795 8/17/2021 0.17.4 is deprecated because it is no longer maintained.
0.17.2 253,370 6/30/2021 0.17.2 is deprecated because it is no longer maintained.
0.17.1 7,044 6/23/2021 0.17.1 is deprecated because it is no longer maintained.
0.17.0 6,781 6/21/2021 0.17.0 is deprecated because it is no longer maintained.
0.16.1 5,318 6/19/2021 0.16.1 is deprecated because it is no longer maintained.
0.16.0 4,038 6/19/2021 0.16.0 is deprecated because it is no longer maintained.
0.15.5 5,640 6/13/2021 0.15.5 is deprecated because it is no longer maintained.
0.15.4 4,165 6/8/2021 0.15.4 is deprecated because it is no longer maintained.
0.15.2 10,866 5/20/2021 0.15.2 is deprecated because it is no longer maintained.
0.15.1 3,905 5/19/2021 0.15.1 is deprecated because it is no longer maintained.
0.14.8 4,374 5/18/2021 0.14.8 is deprecated because it is no longer maintained.
0.14.7 4,181 5/17/2021 0.14.7 is deprecated because it is no longer maintained.
0.14.6 5,387 5/13/2021 0.14.6 is deprecated because it is no longer maintained.
0.14.5 4,329 5/12/2021 0.14.5 is deprecated because it is no longer maintained.
0.14.4 3,918 5/12/2021 0.14.4 is deprecated because it is no longer maintained.
0.14.3 5,458 5/10/2021 0.14.3 is deprecated because it is no longer maintained.
0.14.2 3,917 5/10/2021 0.14.2 is deprecated because it is no longer maintained.
0.14.1 5,315 5/7/2021 0.14.1 is deprecated because it is no longer maintained.
0.14.0 3,983 5/7/2021 0.14.0 is deprecated because it is no longer maintained.
0.13.5 5,573 4/30/2021 0.13.5 is deprecated because it is no longer maintained.
0.13.4 5,968 4/26/2021 0.13.4 is deprecated because it is no longer maintained.
0.13.3 6,141 4/22/2021 0.13.3 is deprecated because it is no longer maintained.
0.13.2 5,663 4/20/2021 0.13.2 is deprecated because it is no longer maintained.
0.13.1 4,078 4/18/2021 0.13.1 is deprecated because it is no longer maintained.
0.13.0 3,894 4/16/2021 0.13.0 is deprecated because it is no longer maintained.
0.12.2 3,778 4/15/2021 0.12.2 is deprecated because it is no longer maintained.
0.12.1 3,692 4/14/2021 0.12.1 is deprecated because it is no longer maintained.
0.12.0-beta 2,378 4/13/2021 0.12.0-beta is deprecated because it is no longer maintained.
0.11.1 5,521 4/9/2021 0.11.1 is deprecated because it is no longer maintained.
0.11.0 3,859 4/8/2021 0.11.0 is deprecated because it is no longer maintained.
0.10.3 3,785 4/6/2021 0.10.3 is deprecated because it is no longer maintained.
0.10.2 3,752 4/6/2021 0.10.2 is deprecated because it is no longer maintained.
0.10.1 3,761 4/4/2021 0.10.1 is deprecated because it is no longer maintained.
0.10.0 3,746 4/2/2021 0.10.0 is deprecated because it is no longer maintained.
0.9.1 3,788 4/1/2021 0.9.1 is deprecated because it is no longer maintained.
0.9.0 3,699 4/1/2021 0.9.0 is deprecated because it is no longer maintained.
0.8.0 3,977 3/29/2021 0.8.0 is deprecated because it is no longer maintained.
0.7.0 3,754 3/28/2021 0.7.0 is deprecated because it is no longer maintained.
0.6.0 3,775 3/26/2021 0.6.0 is deprecated because it is no longer maintained.
0.5.0 3,723 3/26/2021 0.5.0 is deprecated because it is no longer maintained.
0.4.0 3,741 3/25/2021 0.4.0 is deprecated because it is no longer maintained.
0.3.0 3,698 3/21/2021 0.3.0 is deprecated because it is no longer maintained.
0.2.3 3,830 3/20/2021 0.2.3 is deprecated because it is no longer maintained.
0.2.2 4,047 3/18/2021 0.2.2 is deprecated because it is no longer maintained.
0.2.1 3,951 3/17/2021 0.2.1 is deprecated because it is no longer maintained.
0.2.0 4,004 3/15/2021 0.2.0 is deprecated because it is no longer maintained.
0.1.0-preview 2,568 3/15/2021 0.1.0-preview is deprecated because it is no longer maintained.
0.0.7-beta 2,544 3/14/2021 0.0.7-beta is deprecated because it is no longer maintained.
0.0.6-beta 2,557 3/14/2021 0.0.6-beta is deprecated because it is no longer maintained.
0.0.5-beta 2,668 3/14/2021 0.0.5-beta is deprecated because it is no longer maintained.
0.0.4-beta 2,551 3/14/2021 0.0.4-beta is deprecated because it is no longer maintained.
0.0.3-beta 2,517 3/13/2021 0.0.3-beta is deprecated because it is no longer maintained.
0.0.2-beta 2,477 3/4/2021 0.0.2-beta is deprecated because it is no longer maintained.
0.0.1-beta 2,492 3/3/2021 0.0.1-beta is deprecated because it is no longer maintained.