GCCN.ActiveReports.SpreadBuilder
3.0.0
dotnet add package GCCN.ActiveReports.SpreadBuilder --version 3.0.0
NuGet\Install-Package GCCN.ActiveReports.SpreadBuilder -Version 3.0.0
<PackageReference Include="GCCN.ActiveReports.SpreadBuilder" Version="3.0.0" />
<PackageVersion Include="GCCN.ActiveReports.SpreadBuilder" Version="3.0.0" />
<PackageReference Include="GCCN.ActiveReports.SpreadBuilder" />
paket add GCCN.ActiveReports.SpreadBuilder --version 3.0.0
#r "nuget: GCCN.ActiveReports.SpreadBuilder, 3.0.0"
#:package GCCN.ActiveReports.SpreadBuilder@3.0.0
#addin nuget:?package=GCCN.ActiveReports.SpreadBuilder&version=3.0.0
#tool nuget:?package=GCCN.ActiveReports.SpreadBuilder&version=3.0.0
简介
ActiveReports 是一款专注于 .NET 和 .NET Core 平台的报表控件。通过拖拽式报表设计器,可以快速地设计 Excel表格、Word文档、图表、数据过滤、数据钻取、精准套打等类型报表
ActiveReports 为开发者和最终用户提供了丰富的报表功能,包括:
- 集成到 VisualStudio 中便于开发使用;
- 支持 PaaS 部署方式,例如 Azure Linux App Service;
- 数据透视和多种聚合方式;
- 丰富的数据可视化展示方式;
- 可导出为多种主流文档格式,例如 PDF/Excel/Word;
- 更多产品特性和资料可访问 https://www.grapecity.com.cn/developer/activereports;
功能说明
该包包含用于读取、操作和写入 Excel 文件的 .NET 和 .NET Core 程序集。
示例代码:
// 创建工作簿并添加一个工作表
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(1, 1);
System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap);
GrapeCity.SpreadBuilder.Workbook sb = new GrapeCity.SpreadBuilder.Workbook((text, measurementParams) =>
{
// 为自动行高进行的代码配置
System.Drawing.FontStyle style = System.Drawing.FontStyle.Regular;
if (measurementParams.FontBold) style |= System.Drawing.FontStyle.Bold;
if (measurementParams.FontItalic) style |= System.Drawing.FontStyle.Italic;
using (System.Drawing.Font gFont = new System.Drawing.Font(measurementParams.FontName, measurementParams.FontSize, style))
{
int maxWidth = (int)System.Math.Ceiling(measurementParams.MaxWidth);
System.Drawing.SizeF size = graphics.MeasureString(text, gFont, maxWidth == 0 ? 999999 : maxWidth);
return new System.Drawing.SizeF((float)System.Math.Ceiling(size.Width), (float)System.Math.Ceiling(size.Height));
}
});
sb.Sheets.AddNew();
// 为行、列和单元格设置数据
sb.Sheets[0].Name = "Customer Call List";
sb.Sheets[0].Columns(0).Width = 2 * 1440;
sb.Sheets[0].Columns(1).Width = 1440;
sb.Sheets[0].Columns(2).Width = 1440;
sb.Sheets[0].Rows(0).Height = 1440 / 4;
// 标题行
sb.Sheets[0].Cell(0,0).SetValue("Company Name");
sb.Sheets[0].Cell(0,0).FontBold = true;
sb.Sheets[0].Cell(0,1).SetValue("Contact Name");
sb.Sheets[0].Cell(0,1).FontBold = true;
sb.Sheets[0].Cell(0,2).SetValue("Phone");
sb.Sheets[0].Cell(0,2).FontBold = true;
// 第一个数据行
sb.Sheets[0].Cell(1,0).SetValue("GrapeCity");
sb.Sheets[0].Cell(1,1).SetValue("Mortimer");
sb.Sheets[0].Cell(1,2).SetValue("(425) 880-2601");
// 保存为 Excel 文件
sb.Save("test.xls");
查看更多
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- DocumentFormat.OpenXml (>= 3.2.0 && < 4.0.0)
- System.IO.Packaging (>= 8.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GCCN.ActiveReports.SpreadBuilder:
| Package | Downloads |
|---|---|
|
GCCN.ActiveReports.Export.Word
ActiveReports is a set of assemblies that enable you to create, render, print, and export reports in a .NET or .NET Core application. This package includes the core engine assemblies required to create and render pixel perfect, WYSIWYG, reports. |
|
|
GCCN.ActiveReports.Export.Excel
ActiveReports is a set of assemblies that enable you to create, render, print, and export reports in a .NET or .NET Core application. This package includes the core engine assemblies required to create and render pixel perfect, WYSIWYG, reports. |
GitHub repositories
This package is not used by any popular GitHub repositories.