XLibur is a .NET 8+ library for reading, manipulating, and writing Excel 2007+ (.xlsx, .xlsm) files. It provides an intuitive interface over the underlying OpenXML API.
XLibur forked ClosedXML v0.105.0, applied patches and improvements that didn't land upstream. Namespaces are prefixed with XLibur.
📖 Documentation · Getting Started · Migration from ClosedXML · Benchmarks
Consider XLibur if you want any of the following over ClosedXML 0.105:
- Reduced memory usage and performance gains — particularly for workbooks with many formatted cells. See the published benchmarks.
- Bug fixes — several outstanding community issues resolved that are still pending upstream.
- Community contributions — several community PRs and enhancement requests have been merged into this codebase.
Continue with ClosedXML if:
- You need netstandard2.0 or .NET Framework 4.7.2 support. XLibur targets .NET 8 and above.
- You want a library with a longer track record and a larger pool of maintainers who have worked on it for years.
The recommended package is XLibur.Bundle, which installs the core library together with the
default font engine and behaves like ClosedXML out of the box:
dotnet add package XLibur.BundleOr via the Package Manager console:
PM> Install-Package XLibur.BundleXLibur lets you create and manipulate Excel files without Excel installed — a common use case is generating reports on a web server.
using (var workbook = new XLWorkbook())
{
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
worksheet.Cell("A2").FormulaA1 = "=MID(A1, 7, 5)";
workbook.SaveAs("HelloWorld.xlsx");
}More in the Getting Started guide.
The public API surface is largely unchanged from ClosedXML 0.105. To migrate:
- Install
XLibur.Bundle(see Install) - Replace
using ClosedXMLnamespace references withusing XLibur
One behavioural difference: font engines. ClosedXML bundles SixLabors.Fonts into its core assembly for text measurement (column auto-fit, row heights, glyph metrics). XLibur keeps the core assembly free of any font library and ships the font engine as a separate, swappable package, so you can pick one whose license suits you.
With XLibur.Bundle, no code changes are needed — the SkiaSharp
engine (MIT) auto-registers the first time you create a workbook, and falls back to an embedded
metric-only Calibri-compatible font so measurement works in headless environments. Installing the
bare XLibur package with no font engine throws an InvalidOperationException on workbook creation
telling you which package to add.
To use a different engine — including SixLabors 1.x, which matches ClosedXML 0.105's behaviour exactly — see docs/font-architecture.md for the available packages, their licenses, and the engine resolution order.
Note that as time progresses, the migration path may drift, where possible we'll attempt to provide public API parity with upstream where it makes sense so you can easily test either library without major changes.
XLibur.Report generates reports from .xlsx templates: author the report in Excel, bind .NET data
to it, and generate the finished workbook. Charts, pivot tables and pictures survive range expansion,
which is the part comparable libraries do not do.
using var template = new XLTemplate("SalesReport.xlsx");
template.AddVariable("Company", "Contoso");
template.AddVariable("Sales", sales);
template.Generate();
template.SaveAs("SalesReport-2026.xlsx");See docs/report-templating.md for the template language and tag reference, and XLibur.Report.Examples for ten worked examples.
Published results are available at jafin.github.io/XLBench. Snapshot from 2026-08-02:
Building, testing, and developer guidelines are in CONTRIBUTING.md.
MIT — see LICENSE.
ClosedXML authors who developed the core code we sit on. Manuel de Leon, Jan Havlíček, Francois Botha, Aleksei Pankratev.

