# PivotResult Class

> PivotResult class in the TX Sheet Control .NET API: Detached materialized result; paths identify corresponding data rows and column-member groups.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > PivotResult Class
- **1142 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/llms-full.txt

---

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](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/cells-property/llms-full.txt) | Complete typed output matrix, including headers. |
| [RowPaths](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/rowpaths-property/llms-full.txt) | Grouped paths for data/subtotal/grand-total rows. |
| [ColumnPaths](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/columnpaths-property/llms-full.txt) | Grouped paths for column member groups. |
| [HeaderRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/headerrows-property/llms-full.txt) | Number of header rows at the top of Cells. |
| [LabelColumns](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/labelcolumns-property/llms-full.txt) | Number of left-hand label columns. |
| [SourceRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/sourcerows-property/llms-full.txt) | Number of contributing filtered source records. |
| [SubtotalRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/subtotalrows-property/llms-full.txt) | Zero-based Cells row indices of subtotals. |
| [GrandTotalRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/grandtotalrows-property/llms-full.txt) | Zero-based Cells row indices of grand totals. |

### Example

```csharp
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([
    ["Region", "Category", "Revenue", "Cost"],
    ["Europe", "Software", 1250, 500], ["Europe", "Services", 700, 350],
    ["Americas", "Software", 1800, 900], ["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](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pivot-tables/llms-full.txt) for field settings, output and lifetime rules.

### Constructor

```csharp
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.

---

## In This Section

- [PivotResult.Cells Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/cells-property/llms-full.txt): PivotResult.Cells property in the TX Sheet Control .NET API: Complete typed output matrix, including headers. Shown with its type object?[][] and a C# example.
- [PivotResult.ColumnPaths Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/columnpaths-property/llms-full.txt): PivotResult.ColumnPaths property in the TX Sheet Control .NET API: Grouped paths for column member groups. Shown with its type object?[][] and a C# example.
- [PivotResult.GrandTotalRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/grandtotalrows-property/llms-full.txt): PivotResult.GrandTotalRows property in the TX Sheet Control .NET API: Zero-based Cells row indices of grand totals. Shown with its type int[] and a C# example.
- [PivotResult.HeaderRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/headerrows-property/llms-full.txt): PivotResult.HeaderRows property in the TX Sheet Control .NET API: Number of header rows at the top of Cells. Shown with its type int and a C# example.
- [PivotResult.LabelColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/labelcolumns-property/llms-full.txt): PivotResult.LabelColumns property in the TX Sheet Control .NET API: Number of left-hand label columns. Shown with its type int and a C# example.
- [PivotResult.RowPaths Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/rowpaths-property/llms-full.txt): PivotResult.RowPaths property in the .NET API: Grouped paths for data/subtotal/grand-total rows. Shown with its type object?[][] and a C# example.
- [PivotResult.SourceRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/sourcerows-property/llms-full.txt): PivotResult.SourceRows property in the TX Sheet Control .NET API: Number of contributing filtered source records. Shown with its type int and a C# example.
- [PivotResult.SubtotalRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/subtotalrows-property/llms-full.txt): PivotResult.SubtotalRows property in the TX Sheet Control .NET API: Zero-based Cells row indices of subtotals. Shown with its type int[] and a C# example.

---

## Nearby

- **Previous:** [PivotManualGroup.Items Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotmanualgroup/items-property/llms-full.txt)
- **Next:** [PivotResult.Cells Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotresult/cells-property/llms-full.txt)
