CommonNetFuncs.Excel.OpenXml
4.0.43
dotnet add package CommonNetFuncs.Excel.OpenXml --version 4.0.43
NuGet\Install-Package CommonNetFuncs.Excel.OpenXml -Version 4.0.43
<PackageReference Include="CommonNetFuncs.Excel.OpenXml" Version="4.0.43" />
<PackageVersion Include="CommonNetFuncs.Excel.OpenXml" Version="4.0.43" />
<PackageReference Include="CommonNetFuncs.Excel.OpenXml" />
paket add CommonNetFuncs.Excel.OpenXml --version 4.0.43
#r "nuget: CommonNetFuncs.Excel.OpenXml, 4.0.43"
#:package CommonNetFuncs.Excel.OpenXml@4.0.43
#addin nuget:?package=CommonNetFuncs.Excel.OpenXml&version=4.0.43
#tool nuget:?package=CommonNetFuncs.Excel.OpenXml&version=4.0.43
CommonNetFuncs.Excel.OpenXml
This project contains helper methods for reading and writing Excel files using the OpenXML SDK in .NET applications.
Contents
Common
Low-level helpers for building and manipulating SpreadsheetDocument objects with the OpenXML SDK. Covers creating workbooks and sheets, reading and writing cell values, managing number formats, inserting images, and applying cell styles.
Common Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
InitializeExcelFile / CreateNewSheet
using DocumentFormat.OpenXml.Packaging;
using CommonNetFuncs.Excel.OpenXml;
using MemoryStream ms = new();
using SpreadsheetDocument document = SpreadsheetDocument.Create(ms, SpreadsheetDocumentType.Workbook, true);
uint sheetId = document.InitializeExcelFile("Sheet1"); // creates the workbook and first sheet
uint sheet2Id = document.CreateNewSheet("Sheet2"); // appends a second sheet
Worksheet? ws = document.GetWorksheetById(sheetId);
</details>
Export
Provides a GenericExcelExport extension method that converts any IEnumerable<T> into a .xlsx MemoryStream using the OpenXML SDK directly. Supports optional table formatting, custom sheet and table names, and column exclusion.
Export Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
GenericExcelExport
using CommonNetFuncs.Excel.OpenXml;
List<MyRecord> data = GetData();
// Basic export
MemoryStream? stream = data.GenericExcelExport();
// Export as a formatted Excel table, skipping a column
MemoryStream? stream = data.GenericExcelExport(
createTable: true,
sheetName: "Report",
tableName: "ReportTable",
skipColumnNames: ["InternalId"]
);
// Return as a file download from an ASP.NET Core endpoint
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "report.xlsx");
</details>
Installation
Install via NuGet:
dotnet add package CommonNetFuncs.Excel.OpenXml
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- CommonNetFuncs.Core (>= 4.0.43)
- CommonNetFuncs.Excel.Common (>= 4.0.43)
- CommonNetFuncs.Excel.Npoi (>= 4.0.43)
- DocumentFormat.OpenXml (>= 3.5.1)
- System.Security.Cryptography.Xml (>= 10.0.8)
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 |
|---|---|---|
| 4.0.43 | 0 | 5/14/2026 |
| 4.0.40 | 87 | 5/10/2026 |
| 4.0.39 | 97 | 5/10/2026 |
| 4.0.37 | 99 | 5/9/2026 |
| 4.0.36 | 83 | 5/8/2026 |
| 4.0.31 | 114 | 4/21/2026 |
| 4.0.30 | 95 | 4/20/2026 |
| 4.0.29 | 90 | 4/20/2026 |
| 4.0.28 | 97 | 4/19/2026 |
| 4.0.25 | 101 | 4/3/2026 |
| 4.0.23 | 107 | 3/30/2026 |
| 4.0.17 | 107 | 2/23/2026 |
| 4.0.15 | 116 | 2/8/2026 |
| 4.0.14 | 112 | 2/7/2026 |
| 4.0.12 | 109 | 2/3/2026 |
| 3.8.45 | 96 | 3/30/2026 |
| 3.8.42 | 105 | 3/13/2026 |
| 3.8.38 | 105 | 2/24/2026 |
| 3.8.33 | 108 | 2/2/2026 |