MiniExcel 2.0.0-preview.3
Prefix Reserveddotnet add package MiniExcel --version 2.0.0-preview.3
NuGet\Install-Package MiniExcel -Version 2.0.0-preview.3
<PackageReference Include="MiniExcel" Version="2.0.0-preview.3" />
<PackageVersion Include="MiniExcel" Version="2.0.0-preview.3" />
<PackageReference Include="MiniExcel" />
paket add MiniExcel --version 2.0.0-preview.3
#r "nuget: MiniExcel, 2.0.0-preview.3"
#:package MiniExcel@2.0.0-preview.3
#addin nuget:?package=MiniExcel&version=2.0.0-preview.3&prerelease
#tool nuget:?package=MiniExcel&version=2.0.0-preview.3&prerelease
MiniExcel
MiniExcel is a simple and efficient Excel processing tool for .NET, specifically designed to minimize memory usage.
At present, most popular frameworks need to load all the data from an Excel document into memory to facilitate operations, but this may cause memory consumption problems. MiniExcel's approach is different: the data is processed row by row in a streaming manner, reducing the original consumption from potentially hundreds of megabytes to just a few megabytes, effectively preventing out-of-memory(OOM) issues.

Features
- Minimizes memory consumption, preventing out-of-memory (OOM) errors and avoiding full garbage collections
- Enables real-time, row-level data operations for better performance on large datasets
- Supports LINQ with deferred execution, allowing for fast, memory-efficient paging and complex queries
- Lightweight, without the need for Microsoft Office or COM+ components, and a size under 800KB
- Simple and intuitive API style to import, export, and template Excel worksheets
Quickstart
Importing
You can query worksheets and map the data either to strongly typed classes or dynamic objects:
public class UserAccount
{
public Guid ID { get; set; }
public string Name { get; set; }
public DateTime DateOfBirth { get; set; }
public int Age { get; set; }
public bool Vip { get; set; }
public decimal Points { get; set; }
}
var userRows = MiniExcel.Query<UserAccount>(path);
// or simply
var dynamicRows = MiniExcel.Query(path);
Exporting
There are multiple ways to exprt data to an Excel document:
// From strongly typed objects
var values = new[]
{
new { Name = "MiniExcel", Value = 1 },
new { Name = "Github", Value = 2 }
};
MiniExcel.SaveAs(yourPath, values);
// From anonymous objects
public class TestType
{
public string Name { get; set; }
public int Value { get; set; }
}
TestType[] values =
[
new TestType { Name = "MiniExcel", Value = 1 },
new TestType { Name = "Github", Value = 2 }
];
MiniExcel.SaveAs(yourPath, values);
//From a IEnumerable<IDictionary<string, object>>
new List<Dictionary<string, object>>() dicts =
[
new Dictionary<string, object> { { "Name", "MiniExcel" }, { "Value", 1 } },
new Dictionary<string, object> { { "Name", "Github" }, { "Value", 2 } }
];
MiniExcel.SaveAs(yourPath, dicts);
// Directly from a IDataReader
using var connection = yourConnectionProvider.GetConnection();
connection.Open();
using var cmd = connection.CreateCommand();
cmd.CommandText = """
SELECT 'MiniExcel' AS "Name", 1 AS "Value"
UNION ALL
SELECT 'Github', 2
""";
using var reader = cmd.ExecuteReader();
MiniExcel.SaveAs(yourPath, reader);
// From a DataTable
var table = new DataTable();
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Value", typeof(int));
table.Rows.Add("MiniExcel", 1);
table.Rows.Add("Github", 2);
MiniExcel.SaveAs(path, table);
| Product | Versions 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 is compatible. 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 | 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. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.7)
- Microsoft.Bcl.Memory (>= 10.0.7)
- MiniExcel.Core (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
-
net10.0
- MiniExcel.Core (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
-
net8.0
- MiniExcel.Core (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
-
net9.0
- MiniExcel.Core (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
NuGet packages (177)
Showing the top 5 NuGet packages that depend on MiniExcel:
| Package | Downloads |
|---|---|
|
GuoKun.CPS
国坤CPS库 |
|
|
BootstrapBlazor.TableExport
Bootstrap UI components extensions of export |
|
|
Dynamicweb.DataIntegration.Providers.ExcelProvider
Excel Provider |
|
|
DH.MiniExcel
基于DH框架的Excel处理库。基于https://github.com/mini-software/MiniExcel |
|
|
Wologic.SYS.Application
公司内部自用 |
GitHub repositories (17)
Showing the top 17 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),等诸多黑科技,代码简洁易懂、易扩展让开发更简单、更通用。
|
|
|
mukunku/ParquetViewer
Simple Windows desktop application for viewing & querying Apache Parquet files
|
|
|
colinin/abp-next-admin
这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
|
|
|
xunkong/xunkong
记录旅途中发生的事
|
|
|
VladislavAntonyuk/MauiSamples
.NET MAUI Samples
|
|
|
sdcb/chats
A powerful and flexible frontend & AI gateway for large language models, supporting 21+ mainstream AI model providers.
|
|
|
AIDotNet/Thor
Thor is a powerful artificial intelligence model management tool, whose main purpose is to achieve unified management and use of multiple AI models. Through Thor, users can easily manage and utilize numerous AI models
|
|
|
zmrid/iMES-Factory
iMES工厂管家——您的新一代工厂助手。演示地址:https://imes.625sc.com。 一款基于.NetCore3.1和Vue3的MES管理系统。项目亮点:模版打印,Excel模版导出,自定义实体扩展,移动端精美设计,大屏设计等功能。
|
|
|
lindexi/lindexi_gd
博客用到的代码
|
|
|
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
|
|
|
spacechase0/StardewValleyMods
New home for my stardew valley mod source code
|
|
|
densen2014/BlazorMaui
用 c # 和 Razor 创建本机移动应用和桌面应用。使用 Blazor.BB.Maui,可以快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS 的应用。
|
|
|
ErrorLSC/Polars.NET
.NET DataFrame Engine
|
|
|
shuyu-labs/Text2Sql.Net
Text2Sql.Net 是一个使用DotNet和Semantic Kernel开发的Text2Sql工具
|
|
|
densen2014/Blazor100
Blazor入门100天
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.0.0-preview.3 | 30 | 4/27/2026 | |
| 2.0.0-preview.2 | 41,464 | 11/16/2025 | |
| 2.0.0-preview.1 | 17,868 | 8/31/2025 | |
| 1.43.1 | 9,445 | 4/19/2026 | |
| 1.43.0 | 89,432 | 3/12/2026 | |
| 1.42.0 | 382,563 | 11/16/2025 | |
| 1.41.4 | 287,237 | 9/17/2025 | |
| 1.41.3 | 420,756 | 6/21/2025 | |
| 1.41.2 | 164,396 | 5/23/2025 | |
| 1.41.1 | 233,055 | 4/25/2025 | |
| 1.41.0 | 57,205 | 4/20/2025 | |
| 1.40.1 | 3,789 | 4/18/2025 | |
| 1.40.0 | 42,760 | 4/10/2025 | |
| 1.39.0 | 129,385 | 3/18/2025 | |
| 1.38.0 | 244,726 | 2/16/2025 | |
| 1.37.0 | 78,369 | 1/20/2025 | |
| 1.36.1 | 48,176 | 1/15/2025 | |
| 1.36.0 | 160,283 | 12/12/2024 | |
| 1.35.0 | 202,189 | 11/9/2024 | |
| 1.34.2 | 531,363 | 9/14/2024 |