PivotFieldSortSetting

PivotFieldSortSetting class

Represents the setting for sorting pivot fields.

class PivotFieldSortSetting;

Properties

PropertyTypeDescription
sortTypeSortOrderRepresents the SortOrder.
isSortByLabelsbooleanReadonly. Indicates whether to sort the field by itself or data field.
fieldIndexnumberRepresents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
sortBynumberRepresents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
lineTypeSortedByPivotLineTypeReadonly. The pivot line type sorted by.
isSimpleSortbooleanIndicates whether a simple data sort operation will be applied.
cellstringReadonly. Sorts by the values in which row or column.

Methods

MethodDescription
getSortType()@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.
setSortType(SortOrder)@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.
isSortByLabels()@deprecated. Please use the ‘isSortByLabels’ property instead. Indicates whether to sort the field by itself or data field.
getFieldIndex()@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
setFieldIndex(number)@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
getSortBy()@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
setSortBy(number)@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
getLineTypeSortedBy()@deprecated. Please use the ’lineTypeSortedBy’ property instead. The pivot line type sorted by.
isSimpleSort()@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.
setIsSimpleSort(boolean)@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.
getCell()@deprecated. Please use the ‘cell’ property instead. Sorts by the values in which row or column.
isNull()Checks whether the implementation object is null.

sortType

Represents the SortOrder.

sortType : SortOrder;

isSortByLabels

Readonly. Indicates whether to sort the field by itself or data field.

isSortByLabels : boolean;

fieldIndex

Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.

fieldIndex : number;

Remarks

NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.

sortBy

Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.

sortBy : number;

lineTypeSortedBy

Readonly. The pivot line type sorted by.

lineTypeSortedBy : PivotLineType;

Remarks

Only works when not sorting this field by labels.

isSimpleSort

Indicates whether a simple data sort operation will be applied.

isSimpleSort : boolean;

Remarks

The default value is true.

cell

Readonly. Sorts by the values in which row or column.

cell : string;

getSortType()

@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.

getSortType() : SortOrder;

Returns

SortOrder

setSortType(SortOrder)

@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.

setSortType(value: SortOrder) : void;

Parameters:

ParameterTypeDescription
valueSortOrderThe value to set.

isSortByLabels()

@deprecated. Please use the ‘isSortByLabels’ property instead. Indicates whether to sort the field by itself or data field.

isSortByLabels() : boolean;

getFieldIndex()

@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.

getFieldIndex() : number;

Remarks

NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.

setFieldIndex(number)

@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.

setFieldIndex(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.

getSortBy()

@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.

getSortBy() : number;

setSortBy(number)

@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.

setSortBy(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLineTypeSortedBy()

@deprecated. Please use the ’lineTypeSortedBy’ property instead. The pivot line type sorted by.

getLineTypeSortedBy() : PivotLineType;

Returns

PivotLineType

Remarks

Only works when not sorting this field by labels.

isSimpleSort()

@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.

isSimpleSort() : boolean;

Remarks

The default value is true.

setIsSimpleSort(boolean)

@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.

setIsSimpleSort(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is true.

getCell()

@deprecated. Please use the ‘cell’ property instead. Sorts by the values in which row or column.

getCell() : string;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;