asposecells.api

Class PivotField

Represents a field in a PivotTable report.

Property Getters/Setters Summary
methodgetAutoShowCount()
method
           Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
methodgetAutoShowField()
method
           Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
methodgetAutoSortField()
method
           Represents auto sort field index. -1 means PivotField itself,others means the position of the data fields.
methodgetBaseFieldIndex()
method
           Represents the base field for a custom calculation.
methodgetBaseIndex()
method
           Represents the PivotField index in the base PivotFields.
methodgetBaseItemIndex()
method
           Represents the item in the base field for a custom calculation. Valid only for data fields.
methodgetBaseItemPosition()
method
           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.
methodgetCurrentPageItem()
method
           Represents the current page item showing for the page field (valid only for page fields).
methodgetDataDisplayFormat()
method
           Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.
methodgetDisplayName()
method
           Represents the PivotField display name.
methodgetDragToColumn()
method
           Indicates whether the specified field can be dragged to the column position. The default value is true.
methodgetDragToData()
method
           Indicates whether the specified field can be dragged to the data position. The default value is true.
methodgetDragToHide()
method
           Indicates whether the specified field can be dragged to the hide position. The default value is true.
methodgetDragToPage()
method
           Indicates whether the specified field can be dragged to the page position. The default value is true.
methodgetDragToRow()
method
           Indicates whether the specified field can be dragged to the row position. The default value is true.
methodgetFunction()
method
           Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.
methodgetInsertBlankRow()
method
           Indicates whether inserting blank line after each item.
methodisAscendShow()
method
           Indicates whether the specified PivotTable field is autoshown ascending.
methodisAscendSort()
method
           Indicates whether the specified PivotTable field is autosorted ascending.
methodisAutoShow()
method
           Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
methodisAutoSort()
method
           Indicates whether the specified PivotTable field is automatically sorted.
methodisAutoSubtotals()
method
           Indicates whether the specified field shows automatic subtotals. Default is true.
methodisCalculatedField()
Indicates whether the specified PivotTable field is calculated field.
methodisIncludeNewItemsInFilter()
method
           indicates whether the field can include new items in manual filter The default value is false.
methodisInsertPageBreaksBetweenItems()
method
           indicates whether the field can insert page breaks between items insert page break after each item The default value is false.
methodisMultipleItemSelectionAllowed()
method
           indicates whether the field can have multiple items selected in the page field The default value is false.
methodisRepeatItemLabels()
method
           indicates whether the field can repeat items labels The default value is false.
methodgetItemCount()
Gets the base item count of this pivot field.
methodgetItems()
Get all base items;
methodgetName()
Represents the PivotField name.
methodgetNumber()
method
setNumber(value)
           Represents the built-in display format of numbers and dates.
methodgetNumberFormat()
method
           Represents the custom display format of numbers and dates.
methodgetOriginalItems()
Get the original base items;
methodgetPivotItems()
Gets the pivot items of the pivot field
methodgetPosition()
Represents the PivotField index in the PivotFields.
methodgetRange()
Gets the group range of the pivot field
methodgetShowAllItems()
method
           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.
methodgetShowCompact()
method
           Indicates whether display labels from the next field in the same column on the Pivot Table view
methodgetShowInOutlineForm()
method
           Indicates whether layout this field in outline form on the Pivot Table view
methodgetShowSubtotalAtTop()
method
           when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
 
Method Summary
methodaddCalculatedItem(name, formula)
Add a calculated item to the pivot field.
methodgetCalculatedFieldFormula()
Get the formula string of the specified calculated field .
methodgetPivotFilterByType(type)
Gets the pivot filter of the pivot field by type
methodgetPivotFilters()
Gets the pivot filters of the pivot field
methodgetSubtotals(subtotalType)
Gets whether the specified field shows that subtotals.
methodhideDetail(isHiddenDetail)
Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.
methodhideItem(index, isHidden)
Sets whether the specific PivotItem in a data field is hidden.
methodhideItem(itemValue, isHidden)
Sets whether the specific PivotItem in a data field is hidden.
methodhideItemDetail(index, isHiddenDetail)
Sets whether the specific PivotItem in a pivot field is hidden detail.
methodinitPivotItems()
Init the pivot items of the pivot field
methodisHiddenItem(index)
Indicates whether the specific PivotItem is hidden.
methodisHiddenItemDetail(index)
Indicates whether the specific PivotItem is hidden detail.
methodsetSubtotals(subtotalType, shown)
Sets whether the specified field shows that subtotals.
 

    • Property Getters/Setters Detail

      • getRange : SxRng 

        SxRng getRange()
        
        Gets the group range of the pivot field
      • isCalculatedField : boolean 

        boolean isCalculatedField()
        
        Indicates whether the specified PivotTable field is calculated field.
      • getBaseIndex/setBaseIndex : int 

        int getBaseIndex() / setBaseIndex(value)
        
        Represents the PivotField index in the base PivotFields.
      • getPosition : int 

        int getPosition()
        
        Represents the PivotField index in the PivotFields.
      • getName : String 

        String getName()
        
        Represents the PivotField name.
      • getDisplayName/setDisplayName : String 

        String getDisplayName() / setDisplayName(value)
        
        Represents the PivotField display name.
      • isAutoSubtotals/setAutoSubtotals : boolean 

        boolean isAutoSubtotals() / setAutoSubtotals(value)
        
        Indicates whether the specified field shows automatic subtotals. Default is true.
      • getDragToColumn/setDragToColumn : boolean 

        boolean getDragToColumn() / setDragToColumn(value)
        
        Indicates whether the specified field can be dragged to the column position. The default value is true.
      • getDragToHide/setDragToHide : boolean 

        boolean getDragToHide() / setDragToHide(value)
        
        Indicates whether the specified field can be dragged to the hide position. The default value is true.
      • getDragToRow/setDragToRow : boolean 

        boolean getDragToRow() / setDragToRow(value)
        
        Indicates whether the specified field can be dragged to the row position. The default value is true.
      • getDragToPage/setDragToPage : boolean 

        boolean getDragToPage() / setDragToPage(value)
        
        Indicates whether the specified field can be dragged to the page position. The default value is true.
      • getDragToData/setDragToData : boolean 

        boolean getDragToData() / setDragToData(value)
        
        Indicates whether the specified field can be dragged to the data position. The default value is true.
      • isMultipleItemSelectionAllowed/setMultipleItemSelectionAllowed : boolean 

        boolean isMultipleItemSelectionAllowed() / setMultipleItemSelectionAllowed(value)
        
        indicates whether the field can have multiple items selected in the page field The default value is false.
      • isRepeatItemLabels/setRepeatItemLabels : boolean 

        boolean isRepeatItemLabels() / setRepeatItemLabels(value)
        
        indicates whether the field can repeat items labels The default value is false.
      • isIncludeNewItemsInFilter/setIncludeNewItemsInFilter : boolean 

        boolean isIncludeNewItemsInFilter() / setIncludeNewItemsInFilter(value)
        
        indicates whether the field can include new items in manual filter The default value is false.
      • isInsertPageBreaksBetweenItems/setInsertPageBreaksBetweenItems : boolean 

        boolean isInsertPageBreaksBetweenItems() / setInsertPageBreaksBetweenItems(value)
        
        indicates whether the field can insert page breaks between items insert page break after each item The default value is false.
      • getShowAllItems/setShowAllItems : boolean 

        boolean getShowAllItems() / setShowAllItems(value)
        
        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.
      • isAutoSort/setAutoSort : boolean 

        boolean isAutoSort() / setAutoSort(value)
        
        Indicates whether the specified PivotTable field is automatically sorted.
      • isAscendSort/setAscendSort : boolean 

        boolean isAscendSort() / setAscendSort(value)
        
        Indicates whether the specified PivotTable field is autosorted ascending.
      • getAutoSortField/setAutoSortField : int 

        int getAutoSortField() / setAutoSortField(value)
        
        Represents auto sort field index. -1 means PivotField itself,others means the position of the data fields.
      • isAutoShow/setAutoShow : boolean 

        boolean isAutoShow() / setAutoShow(value)
        
        Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
      • isAscendShow/setAscendShow : boolean 

        boolean isAscendShow() / setAscendShow(value)
        
        Indicates whether the specified PivotTable field is autoshown ascending.
      • getAutoShowCount/setAutoShowCount : int 

        int getAutoShowCount() / setAutoShowCount(value)
        
        Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
      • getAutoShowField/setAutoShowField : int 

        int getAutoShowField() / setAutoShowField(value)
        
        Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
      • getFunction/setFunction : int 

        int getFunction() / setFunction(value)
        
        Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.
      • getDataDisplayFormat/setDataDisplayFormat : int 

        int getDataDisplayFormat() / setDataDisplayFormat(value)
        
        Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.PivotFieldDataDisplayFormat
      • getBaseFieldIndex/setBaseFieldIndex : int 

        int getBaseFieldIndex() / setBaseFieldIndex(value)
        
        Represents the base field for a custom calculation.
      • getBaseItemPosition/setBaseItemPosition : int 

        int getBaseItemPosition() / setBaseItemPosition(value)
        
        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
      • getBaseItemIndex/setBaseItemIndex : int 

        int getBaseItemIndex() / setBaseItemIndex(value)
        
        Represents the item in the base field for a custom calculation. Valid only for data fields.
      • getCurrentPageItem/setCurrentPageItem : int 

        int getCurrentPageItem() / setCurrentPageItem(value)
        
        Represents the current page item showing for the page field (valid only for page fields).
      • getNumber/setNumber : int 

        int getNumber() / setNumber(value)
        
        Represents the built-in display format of numbers and dates.
      • getInsertBlankRow/setInsertBlankRow : boolean 

        boolean getInsertBlankRow() / setInsertBlankRow(value)
        
        Indicates whether inserting blank line after each item.
      • getShowSubtotalAtTop/setShowSubtotalAtTop : boolean 

        boolean getShowSubtotalAtTop() / setShowSubtotalAtTop(value)
        
        when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
      • getShowInOutlineForm/setShowInOutlineForm : boolean 

        boolean getShowInOutlineForm() / setShowInOutlineForm(value)
        
        Indicates whether layout this field in outline form on the Pivot Table view
      • getNumberFormat/setNumberFormat : String 

        String getNumberFormat() / setNumberFormat(value)
        
        Represents the custom display format of numbers and dates.
      • getItems : String[] 

        String[] getItems()
        
        Get all base items;
      • getOriginalItems : String[] 

        String[] getOriginalItems()
        
        Get the original base items;
      • getItemCount : int 

        int getItemCount()
        
        Gets the base item count of this pivot field.
      • getShowCompact/setShowCompact : boolean 

        boolean getShowCompact() / setShowCompact(value)
        
        Indicates whether display labels from the next field in the same column on the Pivot Table view
    • Method Detail

      • getPivotFilterByType

        PivotFilter getPivotFilterByType(type)
        Gets the pivot filter of the pivot field by type
        Parameters:
        type - A PivotFilterType value.
      • getPivotFilters

        ArrayList getPivotFilters()
        Gets the pivot filters of the pivot field
      • initPivotItems

         initPivotItems()
        Init the pivot items of the pivot field
      • getCalculatedFieldFormula

        String getCalculatedFieldFormula()
        Get the formula string of the specified calculated field .
      • setSubtotals

         setSubtotals(subtotalType, shown)
        Sets whether the specified field shows that subtotals. PivotFieldSubtotalType
        Parameters:
        subtotalType: int - A PivotFieldSubtotalType value. subtotals type.
        shown: boolean - whether the specified field shows that subtotals.
      • getSubtotals

        boolean getSubtotals(subtotalType)
        Gets whether the specified field shows that subtotals.
        Parameters:
        subtotalType: int - A PivotFieldSubtotalType value. subtotals type.
        Returns:
        whether the specified field shows that subtotals.
      • isHiddenItem

        boolean isHiddenItem(index)
        Indicates whether the specific PivotItem is hidden.
        Parameters:
        index: int - the index of the pivotItem in the pivotField.
        Returns:
        whether the specific PivotItem is hidden
      • hideItem

         hideItem(index, isHidden)
        Sets whether the specific PivotItem in a data field is hidden.
        Parameters:
        index: int - the index of the pivotItem in the pivotField.
        isHidden: boolean - whether the specific PivotItem is hidden
      • isHiddenItemDetail

        boolean isHiddenItemDetail(index)
        Indicates whether the specific PivotItem is hidden detail.
        Parameters:
        index: int - the index of the pivotItem in the pivotField.
        Returns:
        whether the specific PivotItem is hidden detail
      • hideItemDetail

         hideItemDetail(index, isHiddenDetail)
        Sets whether the specific PivotItem in a pivot field is hidden detail.
        Parameters:
        index: int - the index of the pivotItem in the pivotField.
        isHiddenDetail: boolean - whether the specific PivotItem is hidden
      • hideDetail

         hideDetail(isHiddenDetail)
        Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.
        Parameters:
        isHiddenDetail: boolean - whether the PivotItems is hidden
      • hideItem

         hideItem(itemValue, isHidden)
        Sets whether the specific PivotItem in a data field is hidden.
        Parameters:
        itemValue: String - the value of the pivotItem in the pivotField.
        isHidden: boolean - whether the specific PivotItem is hidden
      • addCalculatedItem

         addCalculatedItem(name, formula)
        Add a calculated item to the pivot field. Only supports to add calculated item to Row/Column field.
        Parameters:
        name: String - The item's name.
        formula: String - The item's formula