Methods

Methods

addCalculatedItem(name, formula)

Add a calculated item to the pivot field. Only supports to add calculated item to Row/Column field.

Parameters

Name Type Optional Description

name

String

 

The item's name.

formula

String

 

The item's formula

getAutoShowCount()

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

getAutoShowField()

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

getAutoSortField()

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

getBaseFieldIndex()

Represents the base field for a custom calculation.

getBaseIndex()

Represents the PivotField index in the base PivotFields.

getBaseItemIndex()

Represents the item in the base field for a custom calculation. Valid only for data fields.

getBaseItemPosition()

Represents the item in the base field for a custom calculation. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. The value of the property is PivotItemPosition integer constant.PivotItemPosition

getCalculatedFieldFormula()

Get the formula string of the specified calculated field .

getCurrentPageItem()

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

getDataDisplayFormat()

Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.PivotFieldDataDisplayFormat

getDisplayName()

Represents the PivotField display name.

getDragToColumn()

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

getDragToData()

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

getDragToHide()

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

getDragToPage()

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

getDragToRow()

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

getFunction()

Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.

getInsertBlankRow()

Indicates whether inserting blank line after each item.

getItemCount()

Gets the base item count of this pivot field.

getItems()

Get all base items;

getName()

Represents the PivotField name.

getNumber()

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

getNumberFormat()

Represents the custom display format of numbers and dates.

getOriginalItems()

Get the original base items;

getPivotFilterByType()

Gets the pivot filter of the pivot field by type

getPivotFilters()

Gets the pivot filters of the pivot field

getPivotItems()

Gets the pivot items of the pivot field

getPosition()

Represents the PivotField index in the PivotFields.

getRange()

Gets the group range of the pivot field

getShowAllItems()

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

getShowCompact()

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

getShowInOutlineForm()

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

getShowSubtotalAtTop()

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

getSubtotals(subtotalType) → boolean

Gets whether the specified field shows that subtotals.

Parameter

Name Type Optional Description

subtotalType

Number

 

PivotFieldSubtotalType

Returns

boolean whether the specified field shows that subtotals.

hideDetail(isHiddenDetail)

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

Parameter

Name Type Optional Description

isHiddenDetail

boolean

 

whether the PivotItems is hidden

hideItem(index, isHidden)

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

Parameters

Name Type Optional Description

index

Number

 

the index of the pivotItem in the pivotField.

isHidden

boolean

 

whether the specific PivotItem is hidden

hideItem(itemValue, isHidden)

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

Parameters

Name Type Optional Description

itemValue

String

 

the value of the pivotItem in the pivotField.

isHidden

boolean

 

whether the specific PivotItem is hidden

hideItemDetail(index, isHiddenDetail)

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

Parameters

Name Type Optional Description

index

Number

 

the index of the pivotItem in the pivotField.

isHiddenDetail

boolean

 

whether the specific PivotItem is hidden

initPivotItems()

Init the pivot items of the pivot field

isAscendShow()

Indicates whether the specified PivotTable field is autoshown ascending.

isAscendSort()

Indicates whether the specified PivotTable field is autosorted ascending.

isAutoShow()

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

isAutoSort()

Indicates whether the specified PivotTable field is automatically sorted.

isAutoSubtotals()

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

isCalculatedField()

Indicates whether the specified PivotTable field is calculated field.

isHiddenItem(index) → boolean

Indicates whether the specific PivotItem is hidden.

Parameter

Name Type Optional Description

index

Number

 

the index of the pivotItem in the pivotField.

Returns

boolean whether the specific PivotItem is hidden

isHiddenItemDetail(index) → boolean

Indicates whether the specific PivotItem is hidden detail.

Parameter

Name Type Optional Description

index

Number

 

the index of the pivotItem in the pivotField.

Returns

boolean whether the specific PivotItem is hidden detail

isIncludeNewItemsInFilter()

indicates whether the field can include new items in manual filter The default value is false.

isInsertPageBreaksBetweenItems()

indicates whether the field can insert page breaks between items insert page break after each item The default value is false.

isMultipleItemSelectionAllowed()

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

isRepeatItemLabels()

indicates whether the field can repeat items labels The default value is false.

setAscendShow()

Indicates whether the specified PivotTable field is autoshown ascending.

setAscendSort()

Indicates whether the specified PivotTable field is autosorted ascending.

setAutoShow()

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

setAutoShowCount()

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

setAutoShowField()

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

setAutoSort()

Indicates whether the specified PivotTable field is automatically sorted.

setAutoSortField()

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

setAutoSubtotals()

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

setBaseFieldIndex()

Represents the base field for a custom calculation.

setBaseIndex()

Represents the PivotField index in the base PivotFields.

setBaseItemIndex()

Represents the item in the base field for a custom calculation. Valid only for data fields.

setBaseItemPosition()

Represents the item in the base field for a custom calculation. Valid only for data fields. Because PivotItemPosition.Custom is only for read,if you need to set PivotItemPosition.Custom, please set PivotField.BaseItemIndex attribute. The value of the property is PivotItemPosition integer constant.PivotItemPosition

setCurrentPageItem()

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

setDataDisplayFormat()

Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.PivotFieldDataDisplayFormat

setDisplayName()

Represents the PivotField display name.

setDragToColumn()

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

setDragToData()

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

setDragToHide()

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

setDragToPage()

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

setDragToRow()

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

setFunction()

Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.

setIncludeNewItemsInFilter()

indicates whether the field can include new items in manual filter The default value is false.

setInsertBlankRow()

Indicates whether inserting blank line after each item.

setInsertPageBreaksBetweenItems()

indicates whether the field can insert page breaks between items insert page break after each item The default value is false.

setMultipleItemSelectionAllowed()

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

setNumber()

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

setNumberFormat()

Represents the custom display format of numbers and dates.

setRepeatItemLabels()

indicates whether the field can repeat items labels The default value is false.

setShowAllItems()

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

setShowCompact()

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

setShowInOutlineForm()

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

setShowSubtotalAtTop()

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

setSubtotals(subtotalType, shown)

Sets whether the specified field shows that subtotals. PivotFieldSubtotalType

Parameters

Name Type Optional Description

subtotalType

Number

 

PivotFieldSubtotalType

shown

boolean

 

whether the specified field shows that subtotals.