MiniExcel.Core
2.0.0-preview.3
Prefix Reserved
dotnet add package MiniExcel.Core --version 2.0.0-preview.3
NuGet\Install-Package MiniExcel.Core -Version 2.0.0-preview.3
<PackageReference Include="MiniExcel.Core" Version="2.0.0-preview.3" />
<PackageVersion Include="MiniExcel.Core" Version="2.0.0-preview.3" />
<PackageReference Include="MiniExcel.Core" />
paket add MiniExcel.Core --version 2.0.0-preview.3
#r "nuget: MiniExcel.Core, 2.0.0-preview.3"
#:package MiniExcel.Core@2.0.0-preview.3
#addin nuget:?package=MiniExcel.Core&version=2.0.0-preview.3&prerelease
#tool nuget:?package=MiniExcel.Core&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)
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on MiniExcel.Core:
| Package | Downloads |
|---|---|
|
MiniExcel
Lightweight, fast and simple .NET processing tool for importing, exporting and templating spreadsheets. |
|
|
MiniExcel.Csv
Lightweight, fast and simple .NET processing tool for importing, exporting and templating spreadsheets. |
|
|
MiniExcel.OpenXml
Lightweight, fast and simple .NET processing tool for importing, exporting and templating spreadsheets. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-preview.3 | 34 | 4/27/2026 |
| 2.0.0-preview.2 | 45,235 | 11/17/2025 |
| 2.0.0-preview.1 | 18,625 | 8/31/2025 |