• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class PivotTableCollection

Represents a collection of pivot table on a worksheet.

Inheritance
object
PivotTableCollection
Implements
IEnumerable<PivotTable>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
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 Workbook.GetPivotCaches().AddWorksheetSource().

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. "Sheet1!A1:C8" or "A1:C8" (sheet name defaults to the current worksheet). A leading = is stripped automatically.

string locationCell

The top-left cell label of the pivot table output, e.g. "E3".

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.

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX