PivotFieldCollection
PivotFieldCollection class
Represents a collection of all the PivotField objects in the PivotTable’s specific PivotFields type.
class PivotFieldCollection;
Properties
| Property | Type | Description |
|---|---|---|
| type | PivotFieldType | Readonly. Gets the PivotFields type. |
| count | number | Readonly. Gets the count of the pivotFields. |
Methods
| Method | Description |
|---|---|
| get(number) | Gets the PivotField Object at the specific index. |
| get(string) | Gets the PivotField Object of the specific name. |
| getType() | @deprecated. Please use the ’type’ property instead. Gets the PivotFields type. |
| getCount() | @deprecated. Please use the ‘count’ property instead. 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 |
| isNull() | Checks whether the implementation object is null. |
type
Readonly. Gets the PivotFields type.
type : PivotFieldType;
count
Readonly. Gets the count of the pivotFields.
count : number;
get(number)
Gets the PivotField Object at the specific index.
get(index: number) : PivotField;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | number |
Returns
get(string)
Gets the PivotField Object of the specific name.
get(name: string) : PivotField;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string |
Returns
getType()
@deprecated. Please use the ’type’ property instead. Gets the PivotFields type.
getType() : PivotFieldType;
Returns
getCount()
@deprecated. Please use the ‘count’ property instead. 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:
| Parameter | Type | Description |
|---|---|---|
| baseFieldIndex | number | field 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:
| Parameter | Type | Description |
|---|---|---|
| pivotField | PivotField | a 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:
| Parameter | Type | Description |
|---|---|---|
| currPos | number | Current position of PivotField based on zero |
| destPos | number | Destination position of PivotField based on zero |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;