Aid.Xlsx
2.0.1
dotnet add package Aid.Xlsx --version 2.0.1
NuGet\Install-Package Aid.Xlsx -Version 2.0.1
<PackageReference Include="Aid.Xlsx" Version="2.0.1" />
<PackageVersion Include="Aid.Xlsx" Version="2.0.1" />
<PackageReference Include="Aid.Xlsx" />
paket add Aid.Xlsx --version 2.0.1
#r "nuget: Aid.Xlsx, 2.0.1"
#:package Aid.Xlsx@2.0.1
#addin nuget:?package=Aid.Xlsx&version=2.0.1
#tool nuget:?package=Aid.Xlsx&version=2.0.1
Aid.Xlsx
![]()
Aid.Xlsx is a .NET library for reading, creating and editing .xlsx and .xlsm
workbooks. It targets net11.0 and uses its own OPC/XML layer. The Open XML SDK is
used by the tests for schema validation.
Aid.Xlsx 2.x targets .NET 11. For .NET 10 applications, use Aid.Xlsx 1.x.
Documentation
Create your first workbook with the getting started guide.
Find recipes for cells, formatting, formulas, tables, streams, and .xls conversion
in the documentation index.
Goals
- read, create and edit
.xlsx/.xlsm: cells, values, formulas, cached values, styles, number formats, shared strings and rich text, tables, conditional formatting, data validation, comments, hyperlinks, images, page setup and protection; - a public API organized by domain, with
Xlsx*andIXlsx*type names; - no
DocumentFormat.OpenXmldependency at runtime: workbooks are read and written by a custom OPC/XML layer (Aid.Xlsx.Opc); - preservation of unknown parts on round-trip, including
.xlsmVBA projects; - NativeAOT and trimming as supported scenarios, with reflection-free code on the common paths;
- a formula engine ported without semantic changes.
Target framework and NativeAOT
The runtime library, tests and samples target net11.0. The build-time source generator
targets netstandard2.0 so that it can run in the compiler host.
The runtime libraries enable trim, AOT and single-file analyzers. The smoke application creates, saves and reloads a workbook after a fully trimmed or NativeAOT publish.
[XlsxTable] generates a mapper for public instance fields and readable properties. Use
InsertMappedTable or InsertMappedData to insert those rows without reflection. The NuGet
package includes the generator.
using Aid.Xlsx.DataImport.Attributes;
using Aid.Xlsx.DataImport.Mapping;
using Aid.Xlsx.Model.Workbooks;
using var workbook = new XlsxWorkbook();
var sheet = workbook.Worksheets.Add("Sales");
sheet.Cell("A1").InsertMappedTable(new[] { new Sale("Pears", 22m) });
workbook.SaveAs("sales.xlsx");
[XlsxTable("SalesData")]
internal record Sale(string Item, [property: XlsxColumn(Format = "0.00")] decimal Amount);
Convert an Excel 97–2003 workbook
using Aid.Xlsx.Conversion;
XlsConverter.Convert("legacy.xls"); // Writes legacy.xlsx next to legacy.xls.
The converter reads BIFF8 directly. You can also specify a destination path or pass streams. It carries over worksheet values, cell formatting, row and column dimensions, visibility, and merged cells. It preserves formulas that use supported operators, references within the workbook, and common worksheet functions, along with their cached results. Other formulas become static values. See the compatibility guide for conversion limits.
Repository layout
| Project | Responsibility |
|---|---|
| Aid.Xlsx | Workbook model, SpreadsheetML codecs, calculation, and BIFF8 conversion |
| Aid.Xlsx.Opc | Package storage, part relationships, and XML traversal |
| Aid.Xlsx.Formula | Formula and reference parsing |
| Aid.Xlsx.Generators | Compiler-host generators for table mapping and workbook metadata |
| Aid.Xlsx.CodeGen | Command-line generation of SpreadsheetML readers from the pinned XSD |
tests/ contains the unit suite, compatibility checks, NativeAOT smoke test, fuzz targets, and
standalone benchmarks. Repository validation lives under eng/.
Performance
Load and save timings, allocations, and commands to reproduce the measurements are in the workbook I/O benchmarks.
Building
Use the .NET SDK pinned in global.json from the repository root.
dotnet build Aid.Xlsx.slnx -c Release
The first restore needs network access. See the migration guide, compatibility notes, and NativeAOT guide.
Run the GitHub release workflow on main with the version from Directory.Build.props.
This dry run uploads the NuGet and symbol packages, a CycloneDX dependency SBOM, and
SHA-256 checksums. The owner can then push the matching version tag on the verified commit
to publish using the nuget-production environment.
License
Aid.Xlsx is an independent MIT-licensed project derived from ClosedXML. See LICENSE and NOTICE for license and attribution details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- ExcelNumberFormat (>= 1.1.0)
- RBush.Signed (>= 4.0.0)
- SixLabors.Fonts (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.