Class PivotTableCollection
Represents a collection of pivot table on a worksheet.
Inherited Members
Namespace: DRIT.Spreadsheet.Pivot
Assembly: DRIT.Spreadsheet.dll
Syntax
public class PivotTableCollection : IEnumerable<PivotTable>, IEnumerable
Properties
Count
Gets the count of pivot tables.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the pivot table at the specified index.
Declaration
public PivotTable this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index. |
Property Value
| Type | Description |
|---|---|
| PivotTable | The pivot table at the specified index. |
this[string]
Gets the pivot table with the specified name.
Declaration
public PivotTable this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the pivot table. |
Property Value
| Type | Description |
|---|---|
| PivotTable | The pivot table with the specified name. |
Methods
Add(PivotCache, string, string)
Creates and registers a new PivotTable on this worksheet.
Declaration
public PivotTable Add(PivotCache cache, string pivotTableName, string locationCellLabel)
Parameters
| Type | Name | Description |
|---|---|---|
| PivotCache | cache | The PivotCache returned by |
| string | pivotTableName | The name of the pivot table. |
| string | locationCellLabel | The top-left cell label of the pivot table output, e.g. "F1". |
Returns
| Type | Description |
|---|---|
| PivotTable |
Add(string, string, string)
Convenience overload: creates a PivotCache from dataRangeAddress
and then creates and registers a new PivotTable on this worksheet.
Declaration
public PivotTable Add(string dataRangeAddress, string locationCell, string pivotTableName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dataRangeAddress | The source data range, e.g. |
| string | locationCell | The top-left cell label of the pivot table output, e.g. |
| string | pivotTableName | The name of the pivot table. |
Returns
| Type | Description |
|---|---|
| PivotTable |
GetEnumerator()
Retrieves the requested enumerator from the PivotTableCollection.
Declaration
public IEnumerator<PivotTable> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<PivotTable> | The get enumerator returned by the operation. |