XLibur 0.310.0

dotnet add package XLibur --version 0.310.0
                    
NuGet\Install-Package XLibur -Version 0.310.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XLibur" Version="0.310.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XLibur" Version="0.310.0" />
                    
Directory.Packages.props
<PackageReference Include="XLibur" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XLibur --version 0.310.0
                    
#r "nuget: XLibur, 0.310.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XLibur@0.310.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XLibur&version=0.310.0
                    
Install as a Cake Addin
#tool nuget:?package=XLibur&version=0.310.0
                    
Install as a Cake Tool

XLibur

About

XLibur is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.

This is a fork from the ClosedXML project, taken from version v0.105.0 (May 15, 2025). Namespaces are changed to avoid conflicts with the original project.

Primary differences from ClosedXML (0.105)

  • Dropped support for <net8
  • Enable nullability annotations.
  • Leverage later C# lang features.
  • Fix some outstanding bugs we wanted.
  • Improve memory usage, especially with formatted cells.
  • Add a streaming write API for exports too large to hold in memory (see below).

Migration from ClosedXML

At present most of the surface area is the same as ClosedXML. Import the NuGet package, rename the namespace to XLibur, and in most cases you should be ready to go.

Install

dotnet add package XLibur

What can you do with this?

XLibur allows you to create Excel files without the Excel application. The typical example is creating Excel reports on a web server.

Example:

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");
}

Writing very large files

XLWorkbook builds the whole workbook in memory before saving, which puts a ceiling on how large an export can be. For those, XLStreamingWorkbook writes rows straight into the file as you append them, so nothing is retained per row — a million rows by ten columns costs about 108 MB, or 14 MB with Inline string storage.

Memory is flat in the number of rows, but not unconditionally flat: by default each distinct string is held until Finish(), so cost tracks how many distinct text values you write rather than how many rows. A million rows of repeating labels is cheap; a million distinct ones is not — see the note below on Inline storage.

using XLibur.Excel.Streaming;

using var workbook = XLStreamingWorkbook.Create("Large.xlsx");

var sheet = workbook.AddWorksheet("Data");
sheet.Column(1).Width = 30;
sheet.FreezeRows(1);

var header = workbook.CreateStyle();
header.Font.Bold = true;
sheet.AppendRow(["Name", "Amount"], header);

for (var i = 0; i < 1_000_000; i++)
    sheet.AppendRow($"Item {i}", i * 1.5);

workbook.Finish();   // required: writes the strings, styles and workbook parts

The trade is that it is append-only: rows go in ascending order, one worksheet at a time, nothing can be read back or revised, and formulas are stored verbatim rather than evaluated. Use XLWorkbook whenever any of that matters.

Two notes worth knowing. Finish() must be called — disposing without it abandons the write. And by default distinct strings accumulate in a shared string table until then, so if your data has an unbounded number of distinct strings, set StringStorage = XLStreamingStringStorage.Inline to keep memory flat at the cost of a larger file.

Documentation

For full documentation, source code, and contribution guidelines, visit the GitHub repository.

Credits

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on XLibur:

Package Downloads
XLibur.Bundle

See release notes https://github.com/XLibur/XLibur/releases/tag/v0.310.0 Convenience meta-package for XLibur. Installs XLibur together with the default SkiaSharp font engine (MIT). The engine auto-registers on first use — no startup call required. Equivalent to installing XLibur and XLibur.Fonts.SkiaSharp separately.

XLibur.Fonts.SixLabors.V1

See release notes https://github.com/XLibur/XLibur/releases/tag/v0.310.0 Default IXLFontEngine implementation for XLibur using SixLabors.Fonts 1.x (Apache 2.0).

XLibur.Fonts.SixLabors

See release notes https://github.com/XLibur/XLibur/releases/tag/v0.310.0 SixLabors.Fonts 2.x implementation of IXLFontEngine for XLibur.

XLibur.Fonts.SkiaSharp

See release notes https://github.com/XLibur/XLibur/releases/tag/v0.310.0 SkiaSharp implementation of IXLFontEngine for XLibur.

XLibur.Report

See release notes https://github.com/XLibur/XLibur/releases/tag/report-v0.200.0 Report templating for XLibur. Author a report as an ordinary .xlsx template — placeholder expressions, named ranges and tag markers — bind .NET data to it, and generate the finished workbook. Charts, pivot tables and pictures survive range expansion.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.310.0 0 8/6/2026
0.301.0 120 8/4/2026
0.300.1-beta.4 52 8/4/2026
0.300.0 170 8/2/2026
0.200.0 174 8/1/2026
0.106.1-rc.104 84 7/31/2026
0.106.1-beta.95 63 7/31/2026
0.106.1-beta.80 91 7/28/2026
0.106.0 212 7/25/2026
0.105.1-rc.151 74 7/24/2026
0.105.1-rc.137 88 7/23/2026
0.105.1-rc.135 67 7/22/2026
0.105.1-rc.129 77 7/12/2026
0.105.1-rc.119 123 6/23/2026
0.105.1-rc.118 99 6/21/2026
0.105.1-rc.107 104 6/18/2026
0.105.1-rc.105 90 6/17/2026
0.105.1-rc.103 87 6/17/2026
0.105.1-rc.98 123 5/26/2026
0.105.1-rc.89 86 4/30/2026
Loading failed