PivotField

PivotField class

Represents a field in a PivotTable report.

class PivotField;

Properties

PropertyTypeDescription
pivotItemsPivotItemCollectionReadonly. Gets the pivot items of the pivot field
groupSettingsPivotFieldGroupSettingsReadonly. Gets the group settings of the pivot field.
isCalculatedFieldbooleanReadonly. Indicates whether the specified PivotTable field is calculated field.
isValueFieldsbooleanReadonly. Indicates whether this field represents values fields.
baseIndexnumberRepresents the PivotField index in the base PivotFields.
positionnumberReadonly. Represents the index of PivotField in the region.
regionTypePivotFieldTypeReadonly. Specifies the region of the PivotTable that this field is displayed.
namestringRepresents the name of PivotField.
displayNamestringRepresents the PivotField display name.
isAutoSubtotalsbooleanIndicates whether the specified field shows automatic subtotals. Default is true.
dragToColumnbooleanIndicates whether the specified field can be dragged to the column position. The default value is true.
dragToHidebooleanIndicates whether the specified field can be dragged to the hide position. The default value is true.
dragToRowbooleanIndicates whether the specified field can be dragged to the row position. The default value is true.
dragToPagebooleanIndicates whether the specified field can be dragged to the page position. The default value is true.
dragToDatabooleanIndicates whether the specified field can be dragged to the data position. The default value is true.
isMultipleItemSelectionAllowedbooleanindicates whether the field can have multiple items selected in the page field The default value is false.
isRepeatItemLabelsbooleanIndicates whether repeating labels of the field in the region. The default value is false.
isIncludeNewItemsInFilterbooleanIndicates whether including new items to the field in manual filter. The default value is false.
isInsertPageBreaksBetweenItemsbooleanIndicates whether inserting page breaks after each item. The default value is false.
showAllItemsbooleanIndicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.
nonAutoSortDefaultbooleanIndicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.
isAutoSortbooleanIndicates whether the specified PivotTable field is automatically sorted.
isAscendSortbooleanIndicates whether the specified PivotTable field is autosorted ascending.
sortSettingPivotFieldSortSettingReadonly. Gets all settings of auto sorting
autoSortFieldnumberRepresents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.
isAutoShowbooleanIndicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
isAscendShowbooleanIndicates whether the specified PivotTable field is autoshown ascending.
autoShowCountnumberRepresent the number of top or bottom items that are automatically shown in the specified PivotTable field.
autoShowFieldnumberRepresents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
functionConsolidationFunctionRepresents the function used to summarize the PivotTable data field.
showValuesSettingPivotShowValuesSettingReadonly. Gets the settings of showing values as when the ShowDataAs calculation is in use.
currentPageItemnumberRepresents the current page item showing for the page field (valid only for page fields).
numbernumberRepresents the built-in display format of numbers and dates.
insertBlankRowbooleanIndicates whether inserting blank line after each item.
showSubtotalAtTopbooleanwhen ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
showInOutlineFormbooleanIndicates whether layout this field in outline form on the Pivot Table view
numberFormatstringRepresents the custom display format of numbers and dates.
itemsstring[]Readonly. Get all labels of pivot items in this field.
originalItemsstring[]Readonly. Get the original base items;
itemCountnumberReadonly. Gets the count of the base items in this pivot field.
showCompactbooleanIndicates whether display labels from the next field in the same column on the Pivot Table view

Methods

MethodDescription
getPivotItems()@deprecated. Please use the ‘pivotItems’ property instead. Gets the pivot items of the pivot field
getGroupSettings()@deprecated. Please use the ‘groupSettings’ property instead. Gets the group settings of the pivot field.
isCalculatedField()@deprecated. Please use the ‘isCalculatedField’ property instead. Indicates whether the specified PivotTable field is calculated field.
isValueFields()@deprecated. Please use the ‘isValueFields’ property instead. Indicates whether this field represents values fields.
getBaseIndex()@deprecated. Please use the ‘baseIndex’ property instead. Represents the PivotField index in the base PivotFields.
setBaseIndex(number)@deprecated. Please use the ‘baseIndex’ property instead. Represents the PivotField index in the base PivotFields.
getPosition()@deprecated. Please use the ‘position’ property instead. Represents the index of PivotField in the region.
getRegionType()@deprecated. Please use the ‘regionType’ property instead. Specifies the region of the PivotTable that this field is displayed.
getName()@deprecated. Please use the ’name’ property instead. Represents the name of PivotField.
setName(string)@deprecated. Please use the ’name’ property instead. Represents the name of PivotField.
getDisplayName()@deprecated. Please use the ‘displayName’ property instead. Represents the PivotField display name.
setDisplayName(string)@deprecated. Please use the ‘displayName’ property instead. Represents the PivotField display name.
isAutoSubtotals()@deprecated. Please use the ‘isAutoSubtotals’ property instead. Indicates whether the specified field shows automatic subtotals. Default is true.
setIsAutoSubtotals(boolean)@deprecated. Please use the ‘isAutoSubtotals’ property instead. Indicates whether the specified field shows automatic subtotals. Default is true.
getDragToColumn()@deprecated. Please use the ‘dragToColumn’ property instead. Indicates whether the specified field can be dragged to the column position. The default value is true.
setDragToColumn(boolean)@deprecated. Please use the ‘dragToColumn’ property instead. Indicates whether the specified field can be dragged to the column position. The default value is true.
getDragToHide()@deprecated. Please use the ‘dragToHide’ property instead. Indicates whether the specified field can be dragged to the hide position. The default value is true.
setDragToHide(boolean)@deprecated. Please use the ‘dragToHide’ property instead. Indicates whether the specified field can be dragged to the hide position. The default value is true.
getDragToRow()@deprecated. Please use the ‘dragToRow’ property instead. Indicates whether the specified field can be dragged to the row position. The default value is true.
setDragToRow(boolean)@deprecated. Please use the ‘dragToRow’ property instead. Indicates whether the specified field can be dragged to the row position. The default value is true.
getDragToPage()@deprecated. Please use the ‘dragToPage’ property instead. Indicates whether the specified field can be dragged to the page position. The default value is true.
setDragToPage(boolean)@deprecated. Please use the ‘dragToPage’ property instead. Indicates whether the specified field can be dragged to the page position. The default value is true.
getDragToData()@deprecated. Please use the ‘dragToData’ property instead. Indicates whether the specified field can be dragged to the data position. The default value is true.
setDragToData(boolean)@deprecated. Please use the ‘dragToData’ property instead. Indicates whether the specified field can be dragged to the data position. The default value is true.
isMultipleItemSelectionAllowed()@deprecated. Please use the ‘isMultipleItemSelectionAllowed’ property instead. indicates whether the field can have multiple items selected in the page field The default value is false.
setIsMultipleItemSelectionAllowed(boolean)@deprecated. Please use the ‘isMultipleItemSelectionAllowed’ property instead. indicates whether the field can have multiple items selected in the page field The default value is false.
isRepeatItemLabels()@deprecated. Please use the ‘isRepeatItemLabels’ property instead. Indicates whether repeating labels of the field in the region. The default value is false.
setIsRepeatItemLabels(boolean)@deprecated. Please use the ‘isRepeatItemLabels’ property instead. Indicates whether repeating labels of the field in the region. The default value is false.
isIncludeNewItemsInFilter()@deprecated. Please use the ‘isIncludeNewItemsInFilter’ property instead. Indicates whether including new items to the field in manual filter. The default value is false.
setIsIncludeNewItemsInFilter(boolean)@deprecated. Please use the ‘isIncludeNewItemsInFilter’ property instead. Indicates whether including new items to the field in manual filter. The default value is false.
isInsertPageBreaksBetweenItems()@deprecated. Please use the ‘isInsertPageBreaksBetweenItems’ property instead. Indicates whether inserting page breaks after each item. The default value is false.
setIsInsertPageBreaksBetweenItems(boolean)@deprecated. Please use the ‘isInsertPageBreaksBetweenItems’ property instead. Indicates whether inserting page breaks after each item. The default value is false.
getShowAllItems()@deprecated. Please use the ‘showAllItems’ property instead. Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.
setShowAllItems(boolean)@deprecated. Please use the ‘showAllItems’ property instead. Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.
getNonAutoSortDefault()@deprecated. Please use the ’nonAutoSortDefault’ property instead. Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.
setNonAutoSortDefault(boolean)@deprecated. Please use the ’nonAutoSortDefault’ property instead. Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.
isAutoSort()@deprecated. Please use the ‘isAutoSort’ property instead. Indicates whether the specified PivotTable field is automatically sorted.
setIsAutoSort(boolean)@deprecated. Please use the ‘isAutoSort’ property instead. Indicates whether the specified PivotTable field is automatically sorted.
isAscendSort()@deprecated. Please use the ‘isAscendSort’ property instead. Indicates whether the specified PivotTable field is autosorted ascending.
setIsAscendSort(boolean)@deprecated. Please use the ‘isAscendSort’ property instead. Indicates whether the specified PivotTable field is autosorted ascending.
getSortSetting()@deprecated. Please use the ‘sortSetting’ property instead. Gets all settings of auto sorting
getAutoSortField()@deprecated. Please use the ‘autoSortField’ property instead. Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.
setAutoSortField(number)@deprecated. Please use the ‘autoSortField’ property instead. Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.
isAutoShow()@deprecated. Please use the ‘isAutoShow’ property instead. Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
setIsAutoShow(boolean)@deprecated. Please use the ‘isAutoShow’ property instead. Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
isAscendShow()@deprecated. Please use the ‘isAscendShow’ property instead. Indicates whether the specified PivotTable field is autoshown ascending.
setIsAscendShow(boolean)@deprecated. Please use the ‘isAscendShow’ property instead. Indicates whether the specified PivotTable field is autoshown ascending.
getAutoShowCount()@deprecated. Please use the ‘autoShowCount’ property instead. Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
setAutoShowCount(number)@deprecated. Please use the ‘autoShowCount’ property instead. Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
getAutoShowField()@deprecated. Please use the ‘autoShowField’ property instead. Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
setAutoShowField(number)@deprecated. Please use the ‘autoShowField’ property instead. Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
getFunction()@deprecated. Please use the ‘function’ property instead. Represents the function used to summarize the PivotTable data field.
setFunction(ConsolidationFunction)@deprecated. Please use the ‘function’ property instead. Represents the function used to summarize the PivotTable data field.
getShowValuesSetting()@deprecated. Please use the ‘showValuesSetting’ property instead. Gets the settings of showing values as when the ShowDataAs calculation is in use.
getCurrentPageItem()@deprecated. Please use the ‘currentPageItem’ property instead. Represents the current page item showing for the page field (valid only for page fields).
setCurrentPageItem(number)@deprecated. Please use the ‘currentPageItem’ property instead. Represents the current page item showing for the page field (valid only for page fields).
getNumber()@deprecated. Please use the ’number’ property instead. Represents the built-in display format of numbers and dates.
setNumber(number)@deprecated. Please use the ’number’ property instead. Represents the built-in display format of numbers and dates.
getInsertBlankRow()@deprecated. Please use the ‘insertBlankRow’ property instead. Indicates whether inserting blank line after each item.
setInsertBlankRow(boolean)@deprecated. Please use the ‘insertBlankRow’ property instead. Indicates whether inserting blank line after each item.
getShowSubtotalAtTop()@deprecated. Please use the ‘showSubtotalAtTop’ property instead. when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
setShowSubtotalAtTop(boolean)@deprecated. Please use the ‘showSubtotalAtTop’ property instead. when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
getShowInOutlineForm()@deprecated. Please use the ‘showInOutlineForm’ property instead. Indicates whether layout this field in outline form on the Pivot Table view
setShowInOutlineForm(boolean)@deprecated. Please use the ‘showInOutlineForm’ property instead. Indicates whether layout this field in outline form on the Pivot Table view
get_NumberFormat()@deprecated. Please use the ’numberFormat’ property instead. Represents the custom display format of numbers and dates.
setNumberFormat(string)@deprecated. Please use the ’numberFormat’ property instead. Represents the custom display format of numbers and dates.
getItems()@deprecated. Please use the ‘items’ property instead. Get all labels of pivot items in this field.
getOriginalItems()@deprecated. Please use the ‘originalItems’ property instead. Get the original base items;
getItemCount()@deprecated. Please use the ‘itemCount’ property instead. Gets the count of the base items in this pivot field.
getShowCompact()@deprecated. Please use the ‘showCompact’ property instead. Indicates whether display labels from the next field in the same column on the Pivot Table view
setShowCompact(boolean)@deprecated. Please use the ‘showCompact’ property instead. Indicates whether display labels from the next field in the same column on the Pivot Table view
initPivotItems()Init the pivot items of the pivot field
groupBy(number, boolean)Automatically group the field with internal
groupBy(Date, Date, PivotGroupByType[], number, boolean)Group the file by the date group types.
groupBy(number, number, number, boolean)Group the file by number.
groupBy(CustomPiovtFieldGroupItem[], boolean)Custom group the field.
ungroup()Ungroup the pivot field.
getPivotFilterByType(PivotFilterType)Gets the pivot filter of the pivot field by type
getFilters()Gets all pivot filters of this pivot field.
clearFilter()Clears filter setting on this pivot field.
filterTop10(number, PivotFilterType, boolean, number)Filters by values of data pivot field.
filterByValue(number, PivotFilterType, number, number)Filters by values of data pivot field.
filterByLabel(PivotFilterType, string, string)Filters by captions of row or column pivot field.
filterByDate(PivotFilterType, Date, Date)Filters by date setting of row or column pivot field.
getFormula()Gets formula of the calculated field .
setSubtotals(PivotFieldSubtotalType, boolean)Sets whether the specified field shows that subtotals.
getSubtotals(PivotFieldSubtotalType)Indicates whether showing specified subtotal.
sortBy(SortOrder, number)Sorts this pivot field.
sortBy(SortOrder, number, PivotLineType, string)Sorts this pivot field.
showValuesAs(PivotFieldDataDisplayFormat, number, PivotItemPositionType, number)Shows values of data field as different display format when the ShowDataAs calculation is in use.
isHiddenItem(number)Gets whether the specific PivotItem is hidden.
hideItem(number, boolean)Sets whether the specific PivotItem in a data field is hidden.
hideItem(string, boolean)Sets whether the specific PivotItem in a data field is hidden.
isHiddenItemDetail(number)Gets whether hidding the detail of the specific PivotItem..
hideItemDetail(number, boolean)Sets whether the specific PivotItem in a pivot field is hidden detail.
hideDetail(boolean)Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.
addCalculatedItem(string, string)Add a calculated formula item to the pivot field.
isNull()Checks whether the implementation object is null.

pivotItems

Readonly. Gets the pivot items of the pivot field

pivotItems : PivotItemCollection;

groupSettings

Readonly. Gets the group settings of the pivot field.

groupSettings : PivotFieldGroupSettings;

Remarks

If this field is not grouped, Null will be returned.

isCalculatedField

Readonly. Indicates whether the specified PivotTable field is calculated field.

isCalculatedField : boolean;

isValueFields

Readonly. Indicates whether this field represents values fields.

isValueFields : boolean;

baseIndex

Represents the PivotField index in the base PivotFields.

baseIndex : number;

position

Readonly. Represents the index of PivotField in the region.

position : number;

regionType

Readonly. Specifies the region of the PivotTable that this field is displayed.

regionType : PivotFieldType;

name

Represents the name of PivotField.

name : string;

displayName

Represents the PivotField display name.

displayName : string;

isAutoSubtotals

Indicates whether the specified field shows automatic subtotals. Default is true.

isAutoSubtotals : boolean;

dragToColumn

Indicates whether the specified field can be dragged to the column position. The default value is true.

dragToColumn : boolean;

dragToHide

Indicates whether the specified field can be dragged to the hide position. The default value is true.

dragToHide : boolean;

dragToRow

Indicates whether the specified field can be dragged to the row position. The default value is true.

dragToRow : boolean;

dragToPage

Indicates whether the specified field can be dragged to the page position. The default value is true.

dragToPage : boolean;

dragToData

Indicates whether the specified field can be dragged to the data position. The default value is true.

dragToData : boolean;

isMultipleItemSelectionAllowed

indicates whether the field can have multiple items selected in the page field The default value is false.

isMultipleItemSelectionAllowed : boolean;

isRepeatItemLabels

Indicates whether repeating labels of the field in the region. The default value is false.

isRepeatItemLabels : boolean;

isIncludeNewItemsInFilter

Indicates whether including new items to the field in manual filter. The default value is false.

isIncludeNewItemsInFilter : boolean;

isInsertPageBreaksBetweenItems

Indicates whether inserting page breaks after each item. The default value is false.

isInsertPageBreaksBetweenItems : boolean;

showAllItems

Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.

showAllItems : boolean;

nonAutoSortDefault

Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.

nonAutoSortDefault : boolean;

isAutoSort

Indicates whether the specified PivotTable field is automatically sorted.

isAutoSort : boolean;

isAscendSort

Indicates whether the specified PivotTable field is autosorted ascending.

isAscendSort : boolean;

sortSetting

Readonly. Gets all settings of auto sorting

sortSetting : PivotFieldSortSetting;

autoSortField

Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.

autoSortField : number;

isAutoShow

Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.

isAutoShow : boolean;

isAscendShow

Indicates whether the specified PivotTable field is autoshown ascending.

isAscendShow : boolean;

autoShowCount

Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.

autoShowCount : number;

autoShowField

Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.

autoShowField : number;

function

Represents the function used to summarize the PivotTable data field.

function : ConsolidationFunction;

showValuesSetting

Readonly. Gets the settings of showing values as when the ShowDataAs calculation is in use.

showValuesSetting : PivotShowValuesSetting;

currentPageItem

Represents the current page item showing for the page field (valid only for page fields).

currentPageItem : number;

number

Represents the built-in display format of numbers and dates.

number : number;

insertBlankRow

Indicates whether inserting blank line after each item.

insertBlankRow : boolean;

showSubtotalAtTop

when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom

showSubtotalAtTop : boolean;

Remarks

Only works when ShowInOutlineForm is true.

showInOutlineForm

Indicates whether layout this field in outline form on the Pivot Table view

showInOutlineForm : boolean;

numberFormat

Represents the custom display format of numbers and dates.

numberFormat : string;

items

Readonly. Get all labels of pivot items in this field.

items : string[];

originalItems

Readonly. Get the original base items;

originalItems : string[];

itemCount

Readonly. Gets the count of the base items in this pivot field.

itemCount : number;

showCompact

Indicates whether display labels from the next field in the same column on the Pivot Table view

showCompact : boolean;

getPivotItems()

@deprecated. Please use the ‘pivotItems’ property instead. Gets the pivot items of the pivot field

getPivotItems() : PivotItemCollection;

Returns

PivotItemCollection

getGroupSettings()

@deprecated. Please use the ‘groupSettings’ property instead. Gets the group settings of the pivot field.

getGroupSettings() : PivotFieldGroupSettings;

Returns

PivotFieldGroupSettings

Remarks

If this field is not grouped, Null will be returned.

isCalculatedField()

@deprecated. Please use the ‘isCalculatedField’ property instead. Indicates whether the specified PivotTable field is calculated field.

isCalculatedField() : boolean;

isValueFields()

@deprecated. Please use the ‘isValueFields’ property instead. Indicates whether this field represents values fields.

isValueFields() : boolean;

getBaseIndex()

@deprecated. Please use the ‘baseIndex’ property instead. Represents the PivotField index in the base PivotFields.

getBaseIndex() : number;

setBaseIndex(number)

@deprecated. Please use the ‘baseIndex’ property instead. Represents the PivotField index in the base PivotFields.

setBaseIndex(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getPosition()

@deprecated. Please use the ‘position’ property instead. Represents the index of PivotField in the region.

getPosition() : number;

getRegionType()

@deprecated. Please use the ‘regionType’ property instead. Specifies the region of the PivotTable that this field is displayed.

getRegionType() : PivotFieldType;

Returns

PivotFieldType

getName()

@deprecated. Please use the ’name’ property instead. Represents the name of PivotField.

getName() : string;

setName(string)

@deprecated. Please use the ’name’ property instead. Represents the name of PivotField.

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getDisplayName()

@deprecated. Please use the ‘displayName’ property instead. Represents the PivotField display name.

getDisplayName() : string;

setDisplayName(string)

@deprecated. Please use the ‘displayName’ property instead. Represents the PivotField display name.

setDisplayName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isAutoSubtotals()

@deprecated. Please use the ‘isAutoSubtotals’ property instead. Indicates whether the specified field shows automatic subtotals. Default is true.

isAutoSubtotals() : boolean;

setIsAutoSubtotals(boolean)

@deprecated. Please use the ‘isAutoSubtotals’ property instead. Indicates whether the specified field shows automatic subtotals. Default is true.

setIsAutoSubtotals(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDragToColumn()

@deprecated. Please use the ‘dragToColumn’ property instead. Indicates whether the specified field can be dragged to the column position. The default value is true.

getDragToColumn() : boolean;

setDragToColumn(boolean)

@deprecated. Please use the ‘dragToColumn’ property instead. Indicates whether the specified field can be dragged to the column position. The default value is true.

setDragToColumn(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDragToHide()

@deprecated. Please use the ‘dragToHide’ property instead. Indicates whether the specified field can be dragged to the hide position. The default value is true.

getDragToHide() : boolean;

setDragToHide(boolean)

@deprecated. Please use the ‘dragToHide’ property instead. Indicates whether the specified field can be dragged to the hide position. The default value is true.

setDragToHide(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDragToRow()

@deprecated. Please use the ‘dragToRow’ property instead. Indicates whether the specified field can be dragged to the row position. The default value is true.

getDragToRow() : boolean;

setDragToRow(boolean)

@deprecated. Please use the ‘dragToRow’ property instead. Indicates whether the specified field can be dragged to the row position. The default value is true.

setDragToRow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDragToPage()

@deprecated. Please use the ‘dragToPage’ property instead. Indicates whether the specified field can be dragged to the page position. The default value is true.

getDragToPage() : boolean;

setDragToPage(boolean)

@deprecated. Please use the ‘dragToPage’ property instead. Indicates whether the specified field can be dragged to the page position. The default value is true.

setDragToPage(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDragToData()

@deprecated. Please use the ‘dragToData’ property instead. Indicates whether the specified field can be dragged to the data position. The default value is true.

getDragToData() : boolean;

setDragToData(boolean)

@deprecated. Please use the ‘dragToData’ property instead. Indicates whether the specified field can be dragged to the data position. The default value is true.

setDragToData(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isMultipleItemSelectionAllowed()

@deprecated. Please use the ‘isMultipleItemSelectionAllowed’ property instead. indicates whether the field can have multiple items selected in the page field The default value is false.

isMultipleItemSelectionAllowed() : boolean;

setIsMultipleItemSelectionAllowed(boolean)

@deprecated. Please use the ‘isMultipleItemSelectionAllowed’ property instead. indicates whether the field can have multiple items selected in the page field The default value is false.

setIsMultipleItemSelectionAllowed(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isRepeatItemLabels()

@deprecated. Please use the ‘isRepeatItemLabels’ property instead. Indicates whether repeating labels of the field in the region. The default value is false.

isRepeatItemLabels() : boolean;

setIsRepeatItemLabels(boolean)

@deprecated. Please use the ‘isRepeatItemLabels’ property instead. Indicates whether repeating labels of the field in the region. The default value is false.

setIsRepeatItemLabels(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isIncludeNewItemsInFilter()

@deprecated. Please use the ‘isIncludeNewItemsInFilter’ property instead. Indicates whether including new items to the field in manual filter. The default value is false.

isIncludeNewItemsInFilter() : boolean;

setIsIncludeNewItemsInFilter(boolean)

@deprecated. Please use the ‘isIncludeNewItemsInFilter’ property instead. Indicates whether including new items to the field in manual filter. The default value is false.

setIsIncludeNewItemsInFilter(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isInsertPageBreaksBetweenItems()

@deprecated. Please use the ‘isInsertPageBreaksBetweenItems’ property instead. Indicates whether inserting page breaks after each item. The default value is false.

isInsertPageBreaksBetweenItems() : boolean;

setIsInsertPageBreaksBetweenItems(boolean)

@deprecated. Please use the ‘isInsertPageBreaksBetweenItems’ property instead. Indicates whether inserting page breaks after each item. The default value is false.

setIsInsertPageBreaksBetweenItems(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getShowAllItems()

@deprecated. Please use the ‘showAllItems’ property instead. Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.

getShowAllItems() : boolean;

setShowAllItems(boolean)

@deprecated. Please use the ‘showAllItems’ property instead. Indicates whether all items displays in the PivotTable report, even if they don’t contain summary data. show items with no data The default value is false.

setShowAllItems(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getNonAutoSortDefault()

@deprecated. Please use the ’nonAutoSortDefault’ property instead. Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.

getNonAutoSortDefault() : boolean;

setNonAutoSortDefault(boolean)

@deprecated. Please use the ’nonAutoSortDefault’ property instead. Indicates whether a sort operation that will be applied to this pivot field is an autosort operation or a simple data sort.

setNonAutoSortDefault(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isAutoSort()

@deprecated. Please use the ‘isAutoSort’ property instead. Indicates whether the specified PivotTable field is automatically sorted.

isAutoSort() : boolean;

setIsAutoSort(boolean)

@deprecated. Please use the ‘isAutoSort’ property instead. Indicates whether the specified PivotTable field is automatically sorted.

setIsAutoSort(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isAscendSort()

@deprecated. Please use the ‘isAscendSort’ property instead. Indicates whether the specified PivotTable field is autosorted ascending.

isAscendSort() : boolean;

setIsAscendSort(boolean)

@deprecated. Please use the ‘isAscendSort’ property instead. Indicates whether the specified PivotTable field is autosorted ascending.

setIsAscendSort(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getSortSetting()

@deprecated. Please use the ‘sortSetting’ property instead. Gets all settings of auto sorting

getSortSetting() : PivotFieldSortSetting;

Returns

PivotFieldSortSetting

getAutoSortField()

@deprecated. Please use the ‘autoSortField’ property instead. Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.

getAutoSortField() : number;

setAutoSortField(number)

@deprecated. Please use the ‘autoSortField’ property instead. Represents the index of field which is auto sorted. -1 means PivotField itself,others means the position of the data fields.

setAutoSortField(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isAutoShow()

@deprecated. Please use the ‘isAutoShow’ property instead. Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.

isAutoShow() : boolean;

setIsAutoShow(boolean)

@deprecated. Please use the ‘isAutoShow’ property instead. Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.

setIsAutoShow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isAscendShow()

@deprecated. Please use the ‘isAscendShow’ property instead. Indicates whether the specified PivotTable field is autoshown ascending.

isAscendShow() : boolean;

setIsAscendShow(boolean)

@deprecated. Please use the ‘isAscendShow’ property instead. Indicates whether the specified PivotTable field is autoshown ascending.

setIsAscendShow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAutoShowCount()

@deprecated. Please use the ‘autoShowCount’ property instead. Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.

getAutoShowCount() : number;

setAutoShowCount(number)

@deprecated. Please use the ‘autoShowCount’ property instead. Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.

setAutoShowCount(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getAutoShowField()

@deprecated. Please use the ‘autoShowField’ property instead. Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.

getAutoShowField() : number;

setAutoShowField(number)

@deprecated. Please use the ‘autoShowField’ property instead. Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.

setAutoShowField(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getFunction()

@deprecated. Please use the ‘function’ property instead. Represents the function used to summarize the PivotTable data field.

getFunction() : ConsolidationFunction;

Returns

ConsolidationFunction

setFunction(ConsolidationFunction)

@deprecated. Please use the ‘function’ property instead. Represents the function used to summarize the PivotTable data field.

setFunction(value: ConsolidationFunction) : void;

Parameters:

ParameterTypeDescription
valueConsolidationFunctionThe value to set.

getShowValuesSetting()

@deprecated. Please use the ‘showValuesSetting’ property instead. Gets the settings of showing values as when the ShowDataAs calculation is in use.

getShowValuesSetting() : PivotShowValuesSetting;

Returns

PivotShowValuesSetting

getCurrentPageItem()

@deprecated. Please use the ‘currentPageItem’ property instead. Represents the current page item showing for the page field (valid only for page fields).

getCurrentPageItem() : number;

setCurrentPageItem(number)

@deprecated. Please use the ‘currentPageItem’ property instead. Represents the current page item showing for the page field (valid only for page fields).

setCurrentPageItem(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getNumber()

@deprecated. Please use the ’number’ property instead. Represents the built-in display format of numbers and dates.

getNumber() : number;

setNumber(number)

@deprecated. Please use the ’number’ property instead. Represents the built-in display format of numbers and dates.

setNumber(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getInsertBlankRow()

@deprecated. Please use the ‘insertBlankRow’ property instead. Indicates whether inserting blank line after each item.

getInsertBlankRow() : boolean;

setInsertBlankRow(boolean)

@deprecated. Please use the ‘insertBlankRow’ property instead. Indicates whether inserting blank line after each item.

setInsertBlankRow(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getShowSubtotalAtTop()

@deprecated. Please use the ‘showSubtotalAtTop’ property instead. when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom

getShowSubtotalAtTop() : boolean;

Remarks

Only works when ShowInOutlineForm is true.

setShowSubtotalAtTop(boolean)

@deprecated. Please use the ‘showSubtotalAtTop’ property instead. when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom

setShowSubtotalAtTop(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only works when ShowInOutlineForm is true.

getShowInOutlineForm()

@deprecated. Please use the ‘showInOutlineForm’ property instead. Indicates whether layout this field in outline form on the Pivot Table view

getShowInOutlineForm() : boolean;

setShowInOutlineForm(boolean)

@deprecated. Please use the ‘showInOutlineForm’ property instead. Indicates whether layout this field in outline form on the Pivot Table view

setShowInOutlineForm(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

get_NumberFormat()

@deprecated. Please use the ’numberFormat’ property instead. Represents the custom display format of numbers and dates.

get_NumberFormat() : string;

setNumberFormat(string)

@deprecated. Please use the ’numberFormat’ property instead. Represents the custom display format of numbers and dates.

setNumberFormat(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getItems()

@deprecated. Please use the ‘items’ property instead. Get all labels of pivot items in this field.

getItems() : string[];

Returns

string[]

getOriginalItems()

@deprecated. Please use the ‘originalItems’ property instead. Get the original base items;

getOriginalItems() : string[];

Returns

string[]

getItemCount()

@deprecated. Please use the ‘itemCount’ property instead. Gets the count of the base items in this pivot field.

getItemCount() : number;

getShowCompact()

@deprecated. Please use the ‘showCompact’ property instead. Indicates whether display labels from the next field in the same column on the Pivot Table view

getShowCompact() : boolean;

setShowCompact(boolean)

@deprecated. Please use the ‘showCompact’ property instead. Indicates whether display labels from the next field in the same column on the Pivot Table view

setShowCompact(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

initPivotItems()

Init the pivot items of the pivot field

initPivotItems() : void;

groupBy(number, boolean)

Automatically group the field with internal

groupBy(interval: number, newField: boolean) : void;

Parameters:

ParameterTypeDescription
intervalnumberThe internal of group. /// Automatic value will be assigned if it’s zero,
newFieldbooleanIndicates whether adding a new field to the pivottable.

groupBy(Date, Date, PivotGroupByType[], number, boolean)

Group the file by the date group types.

groupBy(start: Date, end: Date, groups: PivotGroupByType[], interval: number, firstAsNewField: boolean) : boolean;

Parameters:

ParameterTypeDescription
startDateThe start datetime
endDateThe end of datetime
groupsPivotGroupByType[]Group types
intervalnumberThe interval
firstAsNewFieldbooleanIndicates whether adding a new field to the pivottable. /// Only for the first group item.

Returns

False means this field could not be grouped by date time.

groupBy(number, number, number, boolean)

Group the file by number.

groupBy(start: number, end: number, interval: number, newField: boolean) : boolean;

Parameters:

ParameterTypeDescription
startnumberThe start value
endnumberThe end of value
intervalnumberThe interval
newFieldbooleanIndicates whether adding a new field to the pivottable

Returns

False means this field could not be grouped by date time.

groupBy(CustomPiovtFieldGroupItem[], boolean)

Custom group the field.

groupBy(customGroupItems: CustomPiovtFieldGroupItem[], newField: boolean) : boolean;

Parameters:

ParameterTypeDescription
customGroupItemsCustomPiovtFieldGroupItem[]The custom group items.
newFieldbooleanIndicates whether adding a new field to the pivottable

Returns

False means this field could not be grouped by date time.

ungroup()

Ungroup the pivot field.

ungroup() : void;

getPivotFilterByType(PivotFilterType)

Gets the pivot filter of the pivot field by type

getPivotFilterByType(type: PivotFilterType) : PivotFilter;

Parameters:

ParameterTypeDescription
typePivotFilterType

Returns

PivotFilter

getFilters()

Gets all pivot filters of this pivot field.

getFilters() : PivotFilter[];

Returns

PivotFilter[]

clearFilter()

Clears filter setting on this pivot field.

clearFilter() : void;

filterTop10(number, PivotFilterType, boolean, number)

Filters by values of data pivot field.

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

Parameters:

ParameterTypeDescription
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

filterByValue(number, PivotFilterType, number, number)

Filters by values of data pivot field.

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

Parameters:

ParameterTypeDescription
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

filterByLabel(PivotFilterType, string, string)

Filters by captions of row or column pivot field.

filterByLabel(type: PivotFilterType, label1: string, label2: string) : PivotFilter;

Parameters:

ParameterTypeDescription
typePivotFilterTypeThe type of filtering data.
label1stringThe label of filter condition
label2stringThe upper-bound label of between filter condition

Returns

PivotFilter

filterByDate(PivotFilterType, Date, Date)

Filters by date setting of row or column pivot field.

filterByDate(type: PivotFilterType, dateTime1: Date, dateTime2: Date) : PivotFilter;

Parameters:

ParameterTypeDescription
typePivotFilterTypeThe type of filtering data.
dateTime1DateThe date label of filter condition
dateTime2DateThe upper-bound date label of between filter condition

Returns

PivotFilter

getFormula()

Gets formula of the calculated field .

getFormula() : string;

setSubtotals(PivotFieldSubtotalType, boolean)

Sets whether the specified field shows that subtotals.

setSubtotals(subtotalType: PivotFieldSubtotalType, shown: boolean) : void;

Parameters:

ParameterTypeDescription
subtotalTypePivotFieldSubtotalTypesubtotals type.
shownbooleanwhether the specified field shows that subtotals.

getSubtotals(PivotFieldSubtotalType)

Indicates whether showing specified subtotal.

getSubtotals(subtotalType: PivotFieldSubtotalType) : boolean;

Parameters:

ParameterTypeDescription
subtotalTypePivotFieldSubtotalTypesubtotal type.

Returns

Returns whether showing specified subtotal.

sortBy(SortOrder, number)

Sorts this pivot field.

sortBy(sortType: SortOrder, fieldSortedBy: number) : void;

Parameters:

ParameterTypeDescription
sortTypeSortOrderThe type of sorting this field.
fieldSortedBynumberThe index of pivot field sorted by. /// -1 means sorting by data labels of this field, others mean the index of data field sorted by.

sortBy(SortOrder, number, PivotLineType, string)

Sorts this pivot field.

sortBy(sortType: SortOrder, fieldSortedBy: number, dataType: PivotLineType, cellName: string) : void;

Parameters:

ParameterTypeDescription
sortTypeSortOrderThe type of sorting this field.
fieldSortedBynumberThe index of pivot field sorted by. /// -1 means sorting by data labels of this field, others mean the index of data field sorted by.
dataTypePivotLineTypeThe type of data sorted by.
cellNamestringSort by values in the row or column

showValuesAs(PivotFieldDataDisplayFormat, number, PivotItemPositionType, number)

Shows values of data field as different display format when the ShowDataAs calculation is in use.

showValuesAs(displayFormat: PivotFieldDataDisplayFormat, baseField: number, baseItemPositionType: PivotItemPositionType, baseItem: number) : void;

Parameters:

ParameterTypeDescription
displayFormatPivotFieldDataDisplayFormatThe data display format type.
baseFieldnumberThe index to the field which ShowDataAs calculation bases on.
baseItemPositionTypePivotItemPositionTypeThe position type of base iteam.
baseItemnumberThe index to the base item which ShowDataAs calculation bases on. /// Only works when baseItemPositionType is custom.

Remarks

Only for data field.

isHiddenItem(number)

Gets whether the specific PivotItem is hidden.

isHiddenItem(index: number) : boolean;

Parameters:

ParameterTypeDescription
indexnumberThe index of the pivotItem in the pivotField.

Returns

whether the specific PivotItem is hidden

hideItem(number, boolean)

Sets whether the specific PivotItem in a data field is hidden.

hideItem(index: number, isHidden: boolean) : void;

Parameters:

ParameterTypeDescription
indexnumberthe index of the pivotItem in the pivotField.
isHiddenbooleanwhether the specific PivotItem is hidden

hideItem(string, boolean)

Sets whether the specific PivotItem in a data field is hidden.

hideItem(itemValue: string, isHidden: boolean) : void;

Parameters:

ParameterTypeDescription
itemValuestringthe value of the pivotItem in the pivotField.
isHiddenbooleanwhether the specific PivotItem is hidden

isHiddenItemDetail(number)

Gets whether hidding the detail of the specific PivotItem..

isHiddenItemDetail(index: number) : boolean;

Parameters:

ParameterTypeDescription
indexnumberThe index of the pivotItem in the pivotField.

Returns

whether the specific PivotItem is hidden detail

hideItemDetail(number, boolean)

Sets whether the specific PivotItem in a pivot field is hidden detail.

hideItemDetail(index: number, isHiddenDetail: boolean) : void;

Parameters:

ParameterTypeDescription
indexnumberthe index of the pivotItem in the pivotField.
isHiddenDetailbooleanwhether the specific PivotItem is hidden

hideDetail(boolean)

Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.

hideDetail(isHiddenDetail: boolean) : void;

Parameters:

ParameterTypeDescription
isHiddenDetailbooleanWhether hide the detail of the pivot field.

addCalculatedItem(string, string)

Add a calculated formula item to the pivot field.

addCalculatedItem(name: string, formula: string) : void;

Parameters:

ParameterTypeDescription
namestringThe item’s name.
formulastringThe formula of pivot item.

Remarks

Only supports to add calculated item to Row/Column field.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;