com.aspose.cells
Class PivotField

java.lang.Object
    extended by com.aspose.cells.PivotField

public abstract class PivotField 
extends java.lang.Object

Represents a field in a PivotTable report.

Property Getters/Setters Summary
abstract intgetAutoShowCount()
abstract voidsetAutoShowCount(int value)
           Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.
abstract intgetAutoShowField()
abstract voidsetAutoShowField(int value)
           Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.
abstract intgetAutoSortField()
abstract voidsetAutoSortField(int value)
           Represents auto sort field index. -1 means PivotField itself,others means the position of the data fields.
intgetBaseField()
voidsetBaseField(int value)
           Represents the base field for a custom calculation. Please use PivotField.BaseFieldIndex instead
abstract intgetBaseFieldIndex()
abstract voidsetBaseFieldIndex(int value)
           Represents the base field for a custom calculation.
abstract intgetBaseIndex()
abstract voidsetBaseIndex(int value)
           Represents the PivotField index in the base PivotFields.
intgetBaseItem()
voidsetBaseItem(int value)
           Represents the item in the base field for a custom calculation. Valid only for data fields.
abstract intgetBaseItemIndex()
abstract voidsetBaseItemIndex(int value)
           Represents the item in the base field for a custom calculation. Valid only for data fields.
abstract intgetBaseItemPosition()
abstract voidsetBaseItemPosition(int 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.
abstract shortgetCurrentPageItem()
abstract voidsetCurrentPageItem(short value)
           Represents the current page item showing for the page field (valid only for page fields).
abstract intgetDataDisplayFormat()
abstract voidsetDataDisplayFormat(int value)
           Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.
abstract java.lang.StringgetDisplayName()
abstract voidsetDisplayName(java.lang.String value)
           Represents the PivotField display name.
abstract booleangetDragToColumn()
abstract voidsetDragToColumn(boolean value)
           Indicates whether the specified field can be dragged to the column position. The default value is true.
abstract booleangetDragToData()
abstract voidsetDragToData(boolean value)
           Indicates whether the specified field can be dragged to the data position. The default value is true.
abstract booleangetDragToHide()
abstract voidsetDragToHide(boolean value)
           Indicates whether the specified field can be dragged to the hide position. The default value is true.
abstract booleangetDragToPage()
abstract voidsetDragToPage(boolean value)
           Indicates whether the specified field can be dragged to the page position. The default value is true.
abstract booleangetDragToRow()
abstract voidsetDragToRow(boolean value)
           Indicates whether the specified field can be dragged to the row position. The default value is true.
abstract intgetFunction()
abstract voidsetFunction(int value)
           Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.
abstract booleangetInsertBlankRow()
abstract voidsetInsertBlankRow(boolean value)
           Indicates whether inserting blank line after each item.
abstract booleanisAscendShow()
abstract voidsetAscendShow(boolean value)
           Indicates whether the specified PivotTable field is autoshown ascending.
abstract booleanisAscendSort()
abstract voidsetAscendSort(boolean value)
           Indicates whether the specified PivotTable field is autosorted ascending.
abstract booleanisAutoShow()
abstract voidsetAutoShow(boolean value)
           Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.
abstract booleanisAutoSort()
abstract voidsetAutoSort(boolean value)
           Indicates whether the specified PivotTable field is automatically sorted.
abstract booleanisAutoSubtotals()
abstract voidsetAutoSubtotals(boolean value)
           Indicates whether the specified field shows automatic subtotals. Default is true.
abstract booleanisCalculatedField()
           Indicates whether the specified PivotTable field is calculated field.
abstract booleanisIncludeNewItemsInFilter()
abstract voidsetIncludeNewItemsInFilter(boolean value)
           indicates whether the field can include new items in manual filter The default value is false.
abstract booleanisInsertPageBreaksBetweenItems()
abstract voidsetInsertPageBreaksBetweenItems(boolean value)
           indicates whether the field can insert page breaks between items insert page break after each item The default value is false.
abstract booleanisMultipleItemSelectionAllowed()
abstract voidsetMultipleItemSelectionAllowed(boolean value)
           indicates whether the field can have multiple items selected in the page field The default value is false.
abstract booleanisRepeatItemLabels()
abstract voidsetRepeatItemLabels(boolean value)
           indicates whether the field can repeat items labels The default value is false.
abstract intgetItemCount()
           Gets the base item count of this pivot field.
abstract java.lang.String[]getItems()
           Get all base items;
abstract java.lang.StringgetName()
           Represents the PivotField name.
abstract intgetNumber()
abstract voidsetNumber(int value)
           Represents the built-in display format of numbers and dates.
abstract java.lang.StringgetNumberFormat()
abstract voidsetNumberFormat(java.lang.String value)
           Represents the custom display format of numbers and dates.
abstract java.lang.String[]getOriginalItems()
           Get the original base items;
abstract PivotItemCollectiongetPivotItems()
           Gets the pivot items of the pivot field
abstract intgetPosition()
           Represents the PivotField index in the PivotFields.
abstract SxRnggetRange()
           Gets the group range of the pivot field
abstract booleangetShowAllItems()
abstract voidsetShowAllItems(boolean 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.
abstract booleangetShowCompact()
abstract voidsetShowCompact(boolean value)
           Indicates whether showing in compact mode.
abstract booleangetShowInOutlineForm()
abstract voidsetShowInOutlineForm(boolean value)
           Indicates whether layout this field in outline form on the Pivot Table view
abstract booleangetShowSubtotalAtTop()
abstract voidsetShowSubtotalAtTop(boolean value)
           when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom
 
Method Summary
abstract voidaddCalculatedItem(java.lang.String name, java.lang.String formula)
           Add a calculated item to the pivot field.
booleandragToColumn()
           Indicates whether the specified field can be dragged to the column position. The default value is true.
booleandragToHide()
           Indicates whether the specified field can be dragged to the hide position. The default value is true.
booleandragToPage()
           Indicates whether the specified field can be dragged to the page position. The default value is true.
booleandragToRow()
           Indicates whether the specified field can be dragged to the row position. The default value is true.
abstract java.lang.StringgetCalculatedFieldFormula()
           Get the formula string of the specified calculated field .
abstract PivotFiltergetPivotFilterByType(int type)
           Gets the pivot filter of the pivot field by type
abstract java.util.ArrayListgetPivotFilters()
           Gets the pivot filters of the pivot field
abstract booleangetSubtotals(int subtotalType)
           Gets whether the specified field shows that subtotals.
abstract voidhideDetail(boolean isHiddenDetail)
           Sets whether the PivotItems in a pivot field is hidden detail.That is collapse/expand this field.
abstract voidhideItem(int index, boolean isHidden)
           Sets whether the specific PivotItem in a data field is hidden.
abstract voidhideItem(java.lang.String itemValue, boolean isHidden)
           Sets whether the specific PivotItem in a data field is hidden.
abstract voidhideItemDetail(int index, boolean isHiddenDetail)
           Sets whether the specific PivotItem in a pivot field is hidden detail.
abstract voidinitPivotItems()
           Init the pivot items of the pivot field
abstract booleanisHiddenItem(int index)
           Indicates whether the specific PivotItem is hidden.
abstract booleanisHiddenItemDetail(int index)
           Indicates whether the specific PivotItem is hidden detail.
abstract voidsetSubtotals(int subtotalType, boolean shown)
           Sets whether the specified field shows that subtotals.
booleanshowAllItems()
           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.
 

Property Getters/Setters Detail

getPivotItems

public abstract PivotItemCollection getPivotItems()
Gets the pivot items of the pivot field

getRange

public abstract SxRng getRange()
Gets the group range of the pivot field

isCalculatedField

public abstract boolean isCalculatedField()
Indicates whether the specified PivotTable field is calculated field.

getBaseIndex/setBaseIndex

public abstract int getBaseIndex() / public abstract void setBaseIndex(int value)
Represents the PivotField index in the base PivotFields.

getPosition

public abstract int getPosition()
Represents the PivotField index in the PivotFields.

getName

public abstract java.lang.String getName()
Represents the PivotField name.

getDisplayName/setDisplayName

public abstract java.lang.String getDisplayName() / public abstract void setDisplayName(java.lang.String value)
Represents the PivotField display name.

isAutoSubtotals/setAutoSubtotals

public abstract boolean isAutoSubtotals() / public abstract void setAutoSubtotals(boolean value)
Indicates whether the specified field shows automatic subtotals. Default is true.

getDragToColumn/setDragToColumn

public abstract boolean getDragToColumn() / public abstract void setDragToColumn(boolean value)
Indicates whether the specified field can be dragged to the column position. The default value is true.

getDragToHide/setDragToHide

public abstract boolean getDragToHide() / public abstract void setDragToHide(boolean value)
Indicates whether the specified field can be dragged to the hide position. The default value is true.

getDragToRow/setDragToRow

public abstract boolean getDragToRow() / public abstract void setDragToRow(boolean value)
Indicates whether the specified field can be dragged to the row position. The default value is true.

getDragToPage/setDragToPage

public abstract boolean getDragToPage() / public abstract void setDragToPage(boolean value)
Indicates whether the specified field can be dragged to the page position. The default value is true.

getDragToData/setDragToData

public abstract boolean getDragToData() / public abstract void setDragToData(boolean value)
Indicates whether the specified field can be dragged to the data position. The default value is true.

isMultipleItemSelectionAllowed/setMultipleItemSelectionAllowed

public abstract boolean isMultipleItemSelectionAllowed() / public abstract void setMultipleItemSelectionAllowed(boolean value)
indicates whether the field can have multiple items selected in the page field The default value is false.

isRepeatItemLabels/setRepeatItemLabels

public abstract boolean isRepeatItemLabels() / public abstract void setRepeatItemLabels(boolean value)
indicates whether the field can repeat items labels The default value is false.

isIncludeNewItemsInFilter/setIncludeNewItemsInFilter

public abstract boolean isIncludeNewItemsInFilter() / public abstract void setIncludeNewItemsInFilter(boolean value)
indicates whether the field can include new items in manual filter The default value is false.

isInsertPageBreaksBetweenItems/setInsertPageBreaksBetweenItems

public abstract boolean isInsertPageBreaksBetweenItems() / public abstract void setInsertPageBreaksBetweenItems(boolean value)
indicates whether the field can insert page breaks between items insert page break after each item The default value is false.

getShowAllItems/setShowAllItems

public abstract boolean getShowAllItems() / public abstract void setShowAllItems(boolean 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

public abstract boolean isAutoSort() / public abstract void setAutoSort(boolean value)
Indicates whether the specified PivotTable field is automatically sorted.

isAscendSort/setAscendSort

public abstract boolean isAscendSort() / public abstract void setAscendSort(boolean value)
Indicates whether the specified PivotTable field is autosorted ascending.

getAutoSortField/setAutoSortField

public abstract int getAutoSortField() / public abstract void setAutoSortField(int value)
Represents auto sort field index. -1 means PivotField itself,others means the position of the data fields.

isAutoShow/setAutoShow

public abstract boolean isAutoShow() / public abstract void setAutoShow(boolean value)
Indicates whether the specified PivotTable field is automatically shown,only valid for excel 2003.

isAscendShow/setAscendShow

public abstract boolean isAscendShow() / public abstract void setAscendShow(boolean value)
Indicates whether the specified PivotTable field is autoshown ascending.

getAutoShowCount/setAutoShowCount

public abstract int getAutoShowCount() / public abstract void setAutoShowCount(int value)
Represent the number of top or bottom items that are automatically shown in the specified PivotTable field.

getAutoShowField/setAutoShowField

public abstract int getAutoShowField() / public abstract void setAutoShowField(int value)
Represents auto show field index. -1 means PivotField itself. It should be the index of the data fields.

getFunction/setFunction

public abstract int getFunction() / public abstract void setFunction(int value)
Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.

getDataDisplayFormat/setDataDisplayFormat

public abstract int getDataDisplayFormat() / public abstract void setDataDisplayFormat(int value)
Represents how to display the values contained in a data field. The value of the property is PivotFieldDataDisplayFormat integer constant.PivotFieldDataDisplayFormat

getBaseField/setBaseField

public int getBaseField() / public void setBaseField(int value)
Represents the base field for a custom calculation. Please use PivotField.BaseFieldIndex instead NOTE: This member is now obsolete. Instead, please us PivotField.BaseFieldIndex property. This property will be removed 12 months later since April 2016. Aspose apologizes for any inconvenience you may have experienced.

getBaseFieldIndex/setBaseFieldIndex

public abstract int getBaseFieldIndex() / public abstract void setBaseFieldIndex(int value)
Represents the base field for a custom calculation.

getBaseItemPosition/setBaseItemPosition

public abstract int getBaseItemPosition() / public abstract void setBaseItemPosition(int 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

getBaseItem/setBaseItem

public int getBaseItem() / public void setBaseItem(int value)
Represents the item in the base field for a custom calculation. Valid only for data fields. NOTE: This member is now obsolete. Instead, please us PivotField.BaseItemIndex property. This property will be removed 12 months later since April 2016. Aspose apologizes for any inconvenience you may have experienced.

getBaseItemIndex/setBaseItemIndex

public abstract int getBaseItemIndex() / public abstract void setBaseItemIndex(int value)
Represents the item in the base field for a custom calculation. Valid only for data fields.

getCurrentPageItem/setCurrentPageItem

public abstract short getCurrentPageItem() / public abstract void setCurrentPageItem(short value)
Represents the current page item showing for the page field (valid only for page fields).

getNumber/setNumber

public abstract int getNumber() / public abstract void setNumber(int value)
Represents the built-in display format of numbers and dates.

getInsertBlankRow/setInsertBlankRow

public abstract boolean getInsertBlankRow() / public abstract void setInsertBlankRow(boolean value)
Indicates whether inserting blank line after each item.

getShowSubtotalAtTop/setShowSubtotalAtTop

public abstract boolean getShowSubtotalAtTop() / public abstract void setShowSubtotalAtTop(boolean value)
when ShowInOutlineForm is true, then display subtotals at the top of the list of items instead of at the bottom

getShowInOutlineForm/setShowInOutlineForm

public abstract boolean getShowInOutlineForm() / public abstract void setShowInOutlineForm(boolean value)
Indicates whether layout this field in outline form on the Pivot Table view

getNumberFormat/setNumberFormat

public abstract java.lang.String getNumberFormat() / public abstract void setNumberFormat(java.lang.String value)
Represents the custom display format of numbers and dates.

getItems

public abstract java.lang.String[] getItems()
Get all base items;

getOriginalItems

public abstract java.lang.String[] getOriginalItems()
Get the original base items;

getItemCount

public abstract int getItemCount()
Gets the base item count of this pivot field.

getShowCompact/setShowCompact

public abstract boolean getShowCompact() / public abstract void setShowCompact(boolean value)
Indicates whether showing in compact mode.

Method Detail

getPivotFilterByType

public abstract PivotFilter getPivotFilterByType(int type)
Gets the pivot filter of the pivot field by type
Parameters:
type - A PivotFilterType value.

getPivotFilters

public abstract java.util.ArrayList getPivotFilters()
Gets the pivot filters of the pivot field

initPivotItems

public abstract void initPivotItems()
Init the pivot items of the pivot field

getCalculatedFieldFormula

public abstract java.lang.String getCalculatedFieldFormula()
Get the formula string of the specified calculated field .

setSubtotals

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

getSubtotals

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

dragToColumn

public boolean dragToColumn()
Indicates whether the specified field can be dragged to the column position. The default value is true. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Pivot.PivotField.DragToColumn property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

dragToHide

public boolean dragToHide()
Indicates whether the specified field can be dragged to the hide position. The default value is true. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Pivot.PivotField.DragToHide property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

dragToRow

public boolean dragToRow()
Indicates whether the specified field can be dragged to the row position. The default value is true. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Pivot.PivotField.DragToRow property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

dragToPage

public boolean dragToPage()
Indicates whether the specified field can be dragged to the page position. The default value is true. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Pivot.PivotField.DragToPage property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

showAllItems

public boolean showAllItems()
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. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Pivot.PivotField.ShowAllItems property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

isHiddenItem

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

hideItem

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

isHiddenItemDetail

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

hideItemDetail

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

hideDetail

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

hideItem

public abstract void hideItem(java.lang.String itemValue, boolean isHidden)
Sets whether the specific PivotItem in a data field is hidden.
Parameters:
itemValue - the value of the pivotItem in the pivotField.
isHidden - whether the specific PivotItem is hidden

addCalculatedItem

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

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.