Angri450.Nong.Excel 4.5.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Angri450.Nong.Excel --version 4.5.0
                    
NuGet\Install-Package Angri450.Nong.Excel -Version 4.5.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="Angri450.Nong.Excel" Version="4.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Angri450.Nong.Excel" Version="4.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Angri450.Nong.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 Angri450.Nong.Excel --version 4.5.0
                    
#r "nuget: Angri450.Nong.Excel, 4.5.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 Angri450.Nong.Excel@4.5.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=Angri450.Nong.Excel&version=4.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Angri450.Nong.Excel&version=4.5.0
                    
Install as a Cake Tool

Angri450.Nong.Excel

链式 Excel 生成 API,基于 ClosedXML。angri450 设计的流畅构建器模式 —— 一行链式调用搞定表头、数据、样式、冻结、筛选,无需手写 OpenXML。

NuGet .NET

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 提供(已作为传递依赖自动安装)。不要额外安装 ClosedXML NuGet 包,否则会出现类型冲突(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");

CLI Surface

当前 nong excel 命令组包括:

  • nong excel sheets
  • nong excel read
  • nong excel to-groups
  • nong excel restructure
  • nong excel create
  • nong excel dissect
  • nong excel style
  • nong excel formula
  • nong excel pivot

其中 nong excel restructure experiment.spec.json -o experiment.restructured.xlsx --json 用于把多来源实验表重构成标准化总表和描述统计工作簿。

Features

SheetBuilder (链式 API)

angri450 设计的链式构建器,每一步返回自身,IDE 自动补全所有可用操作:

Method Description
Headers(params string[]) 设置列标题
Data(IEnumerable<string[]>) 填充数据行
ColumnWidths(params double[]) 设置列宽
HeaderStyle(bg, fg) 标题行背景色和前景色
AlternatingRows(startRow, color) 从第 N 行开始交替行背景色
FreezePanes(row, col) 冻结窗格
MergeCells(range) 合并单元格
AutoFilter() 启用自动筛选

AdvancedBuilder

数据透视表、迷你图、自动筛选、批注、超链接、富文本、工作表保护、命名区域、排序、打印设置。

StylePresets

内置三套主题:MonoFinanceAcademic

StylePresets.Apply("Academic", wb);

FormulaValidator

保存前公式验证,返回评估反馈:

var result = FormulaValidator.Validate(wb);
if (result.HasErrors)
    Console.WriteLine(string.Join("\n", result.Errors));

NongPandoc Slice

nong excel dissect input.xlsx -o input.slice --json writes the shared nong-pandoc/package/v1 slice package:

manifest.json
document.json
content.jsonl
content.nongmark
structure.json
format.json
diagnostics.json
assets/manifest.json
preview/content.txt

content.nongmark is the primary AI-readable stream. preview/content.txt is only a lossy plain-text preview.

Dependencies

  • Angri450.Nong.ThirdParty — 合并基础库(ClosedXML + OpenXml + 全部传递依赖)
  • System.IO.Packaging — NuGet, OPC 容器支持

API Reference

Class Description
ExcelBuilder 工作表和文档构建入口
AdvancedBuilder 数据透视表、迷你图、批注、超链接、保护
StylePresets 预设主题应用
FormulaValidator 公式语法和引用验证

Author

Built by angri450. Source: Nong.Cli.Net.

License

Apache-2.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 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. 
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