PivotFilterCollection

PivotFilterCollection class

Represents a collection of all the PivotFilter objects

class PivotFilterCollection;

Methods

MethodDescription
get(number)Gets the pivotfilter object at the specific index.
add(number, PivotFilterType)Adds a PivotFilter Object to the specific type
addTop10Filter(number, number, PivotFilterType, boolean, number)Filters by values of data pivot field.
addValueFilter(number, number, PivotFilterType, number, number)Filters by values of data pivot field.
addLabelFilter(number, PivotFilterType, string, string)Filters by captions of row or column pivot field.
addDateFilter(number, PivotFilterType, Date, Date)Filters by date setting of row or column pivot field.
clearFilter(number)Clear PivotFilter from the specific PivotField
getCount()Gets the number of elements contained in.
isNull()Checks whether the implementation object is null.

get(number)

Gets the pivotfilter object at the specific index.

get(index: number) : PivotFilter;

Parameters:

ParameterTypeDescription
indexnumber

Returns

PivotFilter

add(number, PivotFilterType)

Adds a PivotFilter Object to the specific type

add(fieldIndex: number, type: PivotFilterType) : number;

Parameters:

ParameterTypeDescription
fieldIndexnumberthe PivotField index
typePivotFilterTypethe PivotFilter type

Returns

the index of the PivotFilter Object in this PivotFilterCollection.

Remarks

NOTE: This method is now obsolete. Instead, please use PivotFilterCollection.AddValueFilter(),AddTop10Filter(),AddLabelFilter() and AddDateFilter() methods. This method will be removed 12 months later since November 2024. Aspose apologizes for any inconvenience you may have experienced.

addTop10Filter(number, number, PivotFilterType, boolean, number)

Filters by values of data pivot field.

addTop10Filter(baseFieldIndex: number, valueFieldIndex: number, type: PivotFilterType, isTop: boolean, itemCount: number) : PivotFilter;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberThe index of field in the source.
valueFieldIndexnumberThe index of data field in the data region.
typePivotFilterTypeThe type of filtering data. Only can be Count,Sum and Percent.
isTopbooleanIndicates whether filter from top or bottom
itemCountnumberThe item count

Returns

PivotFilter

addValueFilter(number, number, PivotFilterType, number, number)

Filters by values of data pivot field.

addValueFilter(baseFieldIndex: number, valueFieldIndex: number, type: PivotFilterType, value1: number, value2: number) : PivotFilter;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberThe index of field in the source.
valueFieldIndexnumberThe index of value field in the value region.
typePivotFilterTypeThe type of filtering data.
value1numberThe value of filter condition
value2numberThe upper-bound value of between filter condition

Returns

PivotFilter

addLabelFilter(number, PivotFilterType, string, string)

Filters by captions of row or column pivot field.

addLabelFilter(baseFieldIndex: number, type: PivotFilterType, label1: string, label2: string) : PivotFilter;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberThe index of field in the source.
typePivotFilterTypeThe type of filtering data.
label1stringThe label of filter condition
label2stringThe upper-bound label of between filter condition

Returns

PivotFilter

addDateFilter(number, PivotFilterType, Date, Date)

Filters by date setting of row or column pivot field.

addDateFilter(baseFieldIndex: number, type: PivotFilterType, dateTime1: Date, dateTime2: Date) : PivotFilter;

Parameters:

ParameterTypeDescription
baseFieldIndexnumberThe index of field in the source.
typePivotFilterTypeThe type of filtering data.
dateTime1DateThe date label of filter condition
dateTime2DateThe upper-bound date label of between filter condition

Returns

PivotFilter

clearFilter(number)

Clear PivotFilter from the specific PivotField

clearFilter(fieldIndex: number) : void;

Parameters:

ParameterTypeDescription
fieldIndexnumberthe PivotField index

getCount()

Gets the number of elements contained in.

getCount() : number;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;