OfficeDocuments.Excel 4.0.0

dotnet add package OfficeDocuments.Excel --version 4.0.0
                    
NuGet\Install-Package OfficeDocuments.Excel -Version 4.0.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="OfficeDocuments.Excel" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeDocuments.Excel" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OfficeDocuments.Excel" />
                    
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 OfficeDocuments.Excel --version 4.0.0
                    
#r "nuget: OfficeDocuments.Excel, 4.0.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 OfficeDocuments.Excel@4.0.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=OfficeDocuments.Excel&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OfficeDocuments.Excel&version=4.0.0
                    
Install as a Cake Tool

OfficeDocuments.Excel

A .NET library for creating and reading Excel (.xlsx) documents via the Open XML SDK, with a clean, fluent interface that keeps OpenXml internals out of consumer code.

Install

dotnet add package OfficeDocuments.Excel

Quick start

using OfficeDocuments.Excel;

// Create
using (var spreadsheet = new Spreadsheet("report.xlsx", createNew: true))
{
    var sheet = spreadsheet.AddWorksheet("Summary");

    sheet.AddRows(
    [
        ["Product", "Amount"],
        ["Widget", 1250.50m],
        ["Gadget", 890.00m],
    ]);

    sheet.AddCellWithFormula(2, 4, "SUM(B2:B3)");
}

// Read
using (var spreadsheet = new Spreadsheet("report.xlsx", createNew: false))
{
    var sheet = spreadsheet.GetWorksheet("Summary");
    var product = sheet?.GetCellByReference("A2")?.GetStringValue();

    if (sheet?.GetCell(2, 2)?.TryGetValue(out decimal amount) == true)
    {
        // Use amount.
    }
}

Streams work the same way: Spreadsheet.CreateDocument(stream) and Spreadsheet.OpenDocument(stream, isEditable). Rows and columns are 1-based. The workbook is written when you call Close() or dispose it.

What it covers

Workbooks and worksheets, rows, cells, and rectangular ranges; typed reads; formulas, hyperlinks, and comments; reusable styles with merging; bulk insert from collections or objects; sorting, auto-filter, data validation, conditional formatting, freeze panes, auto-fit; worksheet lifecycle operations; named ranges, protection, structured tables, and worksheet images.

Targets

net8.0 · net9.0 · net10.0

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 (1)

Showing the top 1 NuGet packages that depend on OfficeDocuments.Excel:

Package Downloads
OfficeDocuments.Excel.Advanced

Optional advanced layer for OfficeDocuments.Excel: structured tables, named ranges, workbook/worksheet protection, and image embedding. Adds these as extension methods over the minimal core so a consumer who only needs the core does not pay for them.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 121 8/6/2026
3.0.0 356 4/22/2025
2.0.2 194 11/4/2024
2.0.1 421 7/29/2024
2.0.0 164 7/28/2024