Angri450.Nong.Excel
3.0.5
dotnet add package Angri450.Nong.Excel --version 3.0.5
NuGet\Install-Package Angri450.Nong.Excel -Version 3.0.5
<PackageReference Include="Angri450.Nong.Excel" Version="3.0.5" />
<PackageVersion Include="Angri450.Nong.Excel" Version="3.0.5" />
<PackageReference Include="Angri450.Nong.Excel" />
paket add Angri450.Nong.Excel --version 3.0.5
#r "nuget: Angri450.Nong.Excel, 3.0.5"
#:package Angri450.Nong.Excel@3.0.5
#addin nuget:?package=Angri450.Nong.Excel&version=3.0.5
#tool nuget:?package=Angri450.Nong.Excel&version=3.0.5
Angri450.Nong.Excel
Chainable Excel generation API over ClosedXML. Build professional spreadsheets with a fluent builder pattern.
Supported Platforms
.NET 8.0 and above (net8.0, net9.0, net10.0, net11.0). Windows, macOS, Linux.
Install
dotnet add package Angri450.Nong.Excel
ClosedXML.Excel等类型由Angri450.Nong.ThirdParty提供(已作为传递依赖自动安装)。不要额外安装ClosedXMLNuGet 包,否则会出现类型冲突(CS0433)。
Quick Start
using ClosedXML.Excel;
using ExcelCore;
var wb = new XLWorkbook();
ExcelBuilder.Sheet(wb, "Data")
.Headers("Name", "Score", "Grade")
.Data(new[] {
new[] { "Alice", "95", "A" },
new[] { "Bob", "87", "B+" }
})
.ColumnWidths(15, 10, 10)
.HeaderStyle("#1F4E79", "#FFFFFF")
.AlternatingRows(2, "#F5F5F5");
wb.SaveAs("output.xlsx");
Features
SheetBuilder (Chainable API)
| Method | Description |
|---|---|
Headers(params string[]) |
Set column headers |
Data(IEnumerable<string[]>) |
Populate data rows |
ColumnWidths(params double[]) |
Set column widths |
HeaderStyle(bg, fg) |
Header row background and foreground color |
AlternatingRows(startRow, color) |
Alternating row background starting from row N |
FreezePanes(row, col) |
Freeze panes at given position |
MergeCells(range) |
Merge a cell range |
AutoFilter() |
Enable auto-filter on header row |
AdvancedBuilder
Pivot tables, sparklines, auto-filters, comments, hyperlinks, rich text, sheet protection, named ranges, sorting, and print setup.
StylePresets
Built-in themes: Mono, Finance, Academic.
StylePresets.Apply("Academic", wb);
FormulaValidator
Pre-save formula validation with evaluation feedback.
var result = FormulaValidator.Validate(wb);
if (result.HasErrors)
Console.WriteLine(string.Join("\n", result.Errors));
Dependencies
Angri450.Nong.ThirdParty— merged foundation (ClosedXML + OpenXml + all transitive deps)System.IO.Packaging— NuGet, OPC container support
API Reference
| Class | Description |
|---|---|
ExcelBuilder |
Entry point for sheet and workbook building |
AdvancedBuilder |
Pivot tables, sparklines, comments, hyperlinks, protection |
StylePresets |
Pre-built theme application |
FormulaValidator |
Formula syntax and reference validation |
Source
https://github.com/angri450/Nong.NET — Issues and PRs welcome.
License
MIT
| 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 was computed. 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 was computed. 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. |
-
net8.0
- Angri450.Nong.ThirdParty (>= 3.0.2)
- System.IO.Packaging (>= 10.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.