OpenExcelLite 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OpenExcelLite --version 1.2.0
                    
NuGet\Install-Package OpenExcelLite -Version 1.2.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="OpenExcelLite" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenExcelLite" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="OpenExcelLite" />
                    
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 OpenExcelLite --version 1.2.0
                    
#r "nuget: OpenExcelLite, 1.2.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 OpenExcelLite@1.2.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=OpenExcelLite&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=OpenExcelLite&version=1.2.0
                    
Install as a Cake Tool

OpenExcelLite

NuGet Version NuGet Downloads License

A lightweight, schema-safe Excel (XLSX) generator for .NET using the official OpenXML SDK.
Supports both in-memory and streaming Excel creation — designed for fast, dependency-free exports.


✨ Features

  • In-memory Excel builder
  • Streaming XLSX writer for large datasets (100k–1M rows)
  • Table creation with styling
  • AutoFilter support
  • AutoFit column widths (approx algorithm)
  • Date formatting (OADate + style index)
  • Automatic header validation and deduplication
  • Boolean, numeric, string inference
  • Blank row support (in-memory + streaming)
  • NEW in v1.2.0 — Hyperlink support (in-memory + streaming)

OpenExcelLite now supports clickable Excel hyperlinks with:

  • Custom display text
  • Full ECMA-376 compliant <hyperlinks> + relationship parts
  • Works in both in-memory and streaming modes
  • No Excel repair warnings
  • Fully schema-valid output
s.AddRow("Name", "Website");
s.AddRow("Google", XL.Hyper("https://google.com", "Visit Google"));
var bytes = StreamingWorkbookBuilder.Build("Links", w =>
{
    w.WriteRow("Name", "Website");
    w.WriteRow("GitHub", XL.Hyper("https://github.com/livedcode/OpenExcelLite"));
});

🚀 New in v1.1.0 — Blank Row Enhancements

✔ AddEmptyRows() — In-Memory Builder

s.AddEmptyRows(3);
s.AddRow("Id", "Name");
s.AddRow(1, "Alex");

✔ Streaming: WriteEmptyRows()

writer.WriteEmptyRows(5);
writer.WriteRow("Id", "Name");

📄 Example (In-Memory)

var bytes = new WorkbookBuilder()
    .AddSheet("Demo", s =>
    {
        s.AddEmptyRows(2);
        s.AddRow("Id", "Name", "Active");
        s.AddRow(1, "Alex", true);
        s.AddRow(2, "Brian", false);
        s.AddTable("Employees");
        s.AutoFitColumns();
    })
    .Build();

File.WriteAllBytes("demo.xlsx", bytes);

var bytes = new WorkbookBuilder()
    .AddSheet("Links", s =>
    {
        s.AddRow("Name", "Website");
        s.AddRow("Google", XL.Hyper("https://google.com", "Visit Google"));
        s.AddRow("GitHub", XL.Hyper("https://github.com/livedcode/OpenExcelLite"));
    })
    .Build();

File.WriteAllBytes("hyperlinks.xlsx", bytes);

📄 Example (Streaming)

var bytes = StreamingWorkbookBuilder.Build("Demo", writer =>
{
    writer.WriteEmptyRows(4);
    writer.WriteRow("Id", "Name");
    writer.WriteRow(1, "Alex");
});

var bytes = StreamingWorkbookBuilder.Build("Links", writer =>
{
    writer.WriteRow("Name", "Website");
    writer.WriteRow("Google", XL.Hyper("https://google.com", "Visit"));
    writer.WriteRow("GitHub", XL.Hyper("https://github.com/livedcode/OpenExcelLite"));
});

File.WriteAllBytes("streaming_links.xlsx", bytes);

  • Display text stored in the cell
  • URL stored in hyperlink relationship (.rels)
  • Excel renders as a standard clickable hyperlink
  • Works in both in-memory & streaming modes
  • Fully valid when checked with OpenXML Validator
  • No Excel “Repaired Records” alerts

📜 License

MIT License (included in package)

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 162 11/29/2025
1.2.0 167 11/23/2025
1.1.0 325 11/17/2025

v1.2.0 — Hyperlink Support:
- NEW: In-memory hyperlink support (XL.Hyper)
- NEW: Streaming hyperlink support
- NEW: Full OpenXML hyperlink relationships
- NEW: Updated examples and documentation
- FIXED: Schema validation improvements

v1.1.0 — Blank Row Support:
- Added AddEmptyRows(int)
- Added WriteEmptyRows(int)
- Improved header detection
- Fixed AutoFilter/table ranges
- Removed Excel repair warnings