PivotFieldCollection

PivotFieldCollection class

Represents a collection of all the PivotField objects in the PivotTable’s specific PivotFields type.

class PivotFieldCollection;

Methods

MethodDescription
get(number)Gets the PivotField Object at the specific index.
getType()Gets the PivotFields type.
getCount()Gets the count of the pivotFields.
getEnumerator()Gets an enumerator over the elements in this collection in proper sequence.
addByBaseIndex(number)Adds a PivotField Object to the specific type PivotFields.
add(PivotField)Adds a PivotField Object to the specific type PivotFields.
clear()clear all fields of PivotFieldCollection
move(number, number)Moves the PivotField from current position to destination position

get(number)

Gets the PivotField Object at the specific index.

get(index: number) : PivotField;

Parameters:

ParameterTypeDescription
indexnumber

Returns

PivotField

getType()

Gets the PivotFields type.

getType() : PivotFieldType;

Returns

PivotFieldType

getCount()

Gets the count of the pivotFields.

getCount() : number;

getEnumerator()

Gets an enumerator over the elements in this collection in proper sequence.

getEnumerator() : PivotFieldEnumerator;

Returns

enumerator

addByBaseIndex(number)

Adds a PivotField Object to the specific type PivotFields.

addByBaseIndex(baseFieldIndex: number) : number;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberfield index in the base PivotFields.

Returns

the index of the PivotField Object in this PivotFields.

add(PivotField)

Adds a PivotField Object to the specific type PivotFields.

add(pivotField: PivotField) : number;

Parameters:

ParameterTypeDescription
pivotFieldPivotFielda PivotField Object.

Returns

the index of the PivotField Object in this PivotFields.

clear()

clear all fields of PivotFieldCollection

clear() : void;

move(number, number)

Moves the PivotField from current position to destination position

move(currPos: number, destPos: number) : void;

Parameters:

ParameterTypeDescription
currPosnumberCurrent position of PivotField based on zero
destPosnumberDestination position of PivotField based on zero