PivotResult Class
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Server
- Assembly
TXTextControl.TXSheetControl. Api. dll
- Install
dotnet add package TXTextControl..NET 10 and later.TXSheetControl. Server
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
Detached materialized result; paths identify corresponding data rows and column-member groups.
Pivot handles are obtained through the owning workbook or worksheet collection.
Members
| Member | Description |
|---|---|
| Cells | Complete typed output matrix, including headers. |
| RowPaths | Grouped paths for data/subtotal/grand-total rows. |
| ColumnPaths | Grouped paths for column member groups. |
| HeaderRows | Number of header rows at the top of Cells. |
| LabelColumns | Number of left-hand label columns. |
| SourceRows | Number of contributing filtered source records. |
| SubtotalRows | Zero-based Cells row indices of subtotals. |
| GrandTotalRows | Zero-based Cells row indices of grand totals. |
Example
using TXTextControl.TXSheetControl.Server;
await using var control = new ServerSheetControl();
var workbook = control.Workbook;
var source = await workbook.Sheets.AtAsync(0);
await source.Range("A1:D5").SetValuesAsync([
[],
[], ["Europe", "Services", 700, 350],
[], ["Americas", "Services", 950, 400]
]);
var report = await workbook.Sheets.AddAsync("Sales Pivot");
var pivot = await report.PivotTables.AddAsync(new PivotTableOptions {
Name = "RegionalSales", Source = new() { SheetId = source.Id, Range = "A1:D5" },
Destination = new() { SheetId = report.Id, Cell = "B3" },
Rows = [new() { Field = "Region" }], Columns = [new() { Field = "Category" }],
Values = [new() { Field = "Revenue", Caption = "Sales", NumberFormatCode = "$#,##0.00" }]
});
See Pivot Tables for field settings, output and lifetime rules.
Constructor
public PivotResult()
Creates an instance with the property defaults shown in this reference. Settings are validated when applied to the owning document; result objects obtained from document operations are detached snapshots.