OfficeDocuments.Excel
4.0.0
dotnet add package OfficeDocuments.Excel --version 4.0.0
NuGet\Install-Package OfficeDocuments.Excel -Version 4.0.0
<PackageReference Include="OfficeDocuments.Excel" Version="4.0.0" />
<PackageVersion Include="OfficeDocuments.Excel" Version="4.0.0" />
<PackageReference Include="OfficeDocuments.Excel" />
paket add OfficeDocuments.Excel --version 4.0.0
#r "nuget: OfficeDocuments.Excel, 4.0.0"
#:package OfficeDocuments.Excel@4.0.0
#addin nuget:?package=OfficeDocuments.Excel&version=4.0.0
#tool nuget:?package=OfficeDocuments.Excel&version=4.0.0
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
Links
| Product | Versions 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. |
-
net10.0
- DocumentFormat.OpenXml (>= 3.5.1)
-
net8.0
- DocumentFormat.OpenXml (>= 3.5.1)
-
net9.0
- DocumentFormat.OpenXml (>= 3.5.1)
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.