MiniExcel 2.0.0-preview.3
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);
No packages depend on MiniExcel.
https://github.com/mini-software/MiniExcel/tree/master/docs
.NET 10.0
- MiniExcel.Core (>= 2.0.0-preview.3)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
.NET Standard 2.0
- Microsoft.Bcl.Memory (>= 10.0.7)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.7)
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.Core (>= 2.0.0-preview.3)
.NET 9.0
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.Core (>= 2.0.0-preview.3)
.NET 8.0
- MiniExcel.OpenXml (>= 2.0.0-preview.3)
- MiniExcel.Csv (>= 2.0.0-preview.3)
- MiniExcel.Core (>= 2.0.0-preview.3)
| Version | Downloads | Last updated |
|---|---|---|
| 2.0.0-preview.3 | 1 | 05/03/2026 |
| 2.0.0-preview.2 | 5 | 01/21/2026 |
| 2.0.0-preview.1 | 5 | 01/21/2026 |
| 1.43.1 | 2 | 05/02/2026 |
| 1.43.0 | 4 | 03/15/2026 |
| 1.42.0 | 8 | 01/16/2026 |
| 1.41.4 | 8 | 01/21/2026 |
| 1.41.3 | 8 | 01/21/2026 |
| 1.41.2 | 7 | 01/21/2026 |
| 1.41.1 | 7 | 01/21/2026 |
| 1.41.0 | 8 | 01/21/2026 |
| 1.40.1 | 6 | 01/21/2026 |
| 1.40.0 | 8 | 01/21/2026 |
| 1.39.0 | 8 | 01/21/2026 |
| 1.38.0 | 8 | 01/21/2026 |
| 1.37.0 | 7 | 01/21/2026 |
| 1.36.1 | 7 | 01/21/2026 |
| 1.36.0 | 7 | 01/21/2026 |
| 1.35.0 | 8 | 01/21/2026 |
| 1.34.2 | 7 | 01/21/2026 |
| 1.34.1 | 7 | 01/21/2026 |
| 1.34.0 | 8 | 01/21/2026 |
| 1.33.0 | 7 | 01/21/2026 |
| 1.32.1 | 8 | 01/21/2026 |
| 1.32.0 | 7 | 01/21/2026 |
| 1.31.3 | 9 | 01/21/2026 |
| 1.31.2 | 9 | 01/21/2026 |
| 1.31.0 | 8 | 01/21/2026 |
| 1.30.3 | 8 | 01/21/2026 |
| 1.30.2 | 8 | 01/21/2026 |
| 1.30.1 | 8 | 01/21/2026 |
| 1.30.0 | 6 | 01/21/2026 |
| 1.29.0 | 8 | 01/21/2026 |
| 1.28.5 | 7 | 01/21/2026 |
| 1.28.4 | 7 | 01/21/2026 |
| 1.28.2 | 7 | 01/21/2026 |
| 1.28.1 | 8 | 01/21/2026 |
| 1.28.0 | 8 | 01/21/2026 |
| 1.27.0 | 7 | 01/21/2026 |
| 1.26.7 | 7 | 01/21/2026 |
| 1.26.6 | 7 | 01/21/2026 |
| 1.26.5 | 9 | 01/21/2026 |
| 1.26.4 | 8 | 01/21/2026 |
| 1.26.3 | 7 | 01/21/2026 |
| 1.26.2 | 7 | 01/21/2026 |
| 1.26.1 | 8 | 01/21/2026 |
| 1.26.0 | 7 | 01/21/2026 |
| 1.24.2 | 7 | 01/21/2026 |
| 1.24.1 | 7 | 01/21/2026 |
| 1.24.0 | 6 | 01/21/2026 |
| 1.23.2 | 7 | 01/21/2026 |
| 1.23.1 | 7 | 01/21/2026 |
| 1.22.0 | 9 | 01/21/2026 |
| 0.21.5 | 9 | 01/21/2026 |
| 0.21.4 | 7 | 01/21/2026 |
| 0.19.1 | 7 | 01/21/2026 |
| 0.19.0 | 6 | 01/21/2026 |
| 0.18.0 | 6 | 01/21/2026 |
| 0.17.5 | 7 | 01/21/2026 |
| 0.17.4 | 7 | 01/21/2026 |
| 0.17.2 | 7 | 01/21/2026 |
| 0.17.1 | 8 | 01/21/2026 |
| 0.17.0 | 7 | 01/21/2026 |
| 0.16.1 | 7 | 01/21/2026 |
| 0.16.0 | 7 | 01/21/2026 |
| 0.15.5 | 8 | 01/21/2026 |
| 0.15.4 | 9 | 01/21/2026 |
| 0.15.2 | 6 | 01/21/2026 |
| 0.15.1 | 7 | 01/21/2026 |
| 0.14.8 | 8 | 01/21/2026 |
| 0.14.7 | 8 | 01/21/2026 |
| 0.14.6 | 7 | 01/21/2026 |
| 0.14.5 | 8 | 01/21/2026 |
| 0.14.4 | 7 | 01/21/2026 |
| 0.14.3 | 8 | 01/21/2026 |
| 0.14.2 | 7 | 01/21/2026 |
| 0.14.1 | 6 | 01/21/2026 |
| 0.14.0 | 6 | 01/21/2026 |
| 0.13.5 | 8 | 01/21/2026 |
| 0.13.4 | 8 | 01/21/2026 |
| 0.13.3 | 7 | 01/21/2026 |
| 0.13.2 | 8 | 01/21/2026 |
| 0.13.1 | 9 | 01/21/2026 |
| 0.13.0 | 7 | 01/21/2026 |
| 0.12.2 | 9 | 01/21/2026 |
| 0.12.1 | 7 | 01/21/2026 |
| 0.12.0-beta | 7 | 01/21/2026 |
| 0.11.1 | 8 | 01/21/2026 |
| 0.11.0 | 7 | 01/21/2026 |
| 0.10.3 | 8 | 01/21/2026 |
| 0.10.2 | 7 | 01/21/2026 |
| 0.10.1 | 9 | 01/21/2026 |
| 0.10.0 | 5 | 01/21/2026 |
| 0.9.1 | 8 | 01/21/2026 |
| 0.9.0 | 6 | 01/21/2026 |
| 0.8.0 | 7 | 01/21/2026 |
| 0.7.0 | 8 | 01/21/2026 |
| 0.6.0 | 9 | 01/21/2026 |
| 0.5.0 | 6 | 01/21/2026 |
| 0.4.0 | 7 | 01/21/2026 |
| 0.3.0 | 6 | 01/21/2026 |
| 0.2.3 | 6 | 01/21/2026 |
| 0.2.2 | 5 | 01/21/2026 |
| 0.2.1 | 7 | 01/21/2026 |
| 0.2.0 | 6 | 01/21/2026 |
| 0.1.0-preview | 7 | 01/21/2026 |
| 0.0.7-beta | 7 | 01/21/2026 |
| 0.0.6-beta | 8 | 01/21/2026 |
| 0.0.5-beta | 6 | 01/21/2026 |
| 0.0.4-beta | 8 | 01/21/2026 |
| 0.0.3-beta | 6 | 01/21/2026 |
| 0.0.2-beta | 6 | 01/21/2026 |
| 0.0.1-beta | 7 | 01/21/2026 |