All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.PivotField.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





PivotField




com.aspose.cells
Class PivotField

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

public class PivotField 
extends java.lang.Object

Represents a field in a PivotTable report.


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

Property Getters/Setters Detail

getPivotItems

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

getRange

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

isCalculatedField

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

getBaseIndex/setBaseIndex

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

setBaseIndex

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

getPosition

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

getName

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

getDisplayName/setDisplayName

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

setDisplayName

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

isAutoSubtotals/setAutoSubtotals

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

setAutoSubtotals

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

getDragToColumn/setDragToColumn

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

setDragToColumn

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

getDragToHide/setDragToHide

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

setDragToHide

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

getDragToRow/setDragToRow

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

setDragToRow

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

getDragToPage/setDragToPage

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

setDragToPage

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

getDragToData/setDragToData

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

setDragToData

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

isMultipleItemSelectionAllowed/setMultipleItemSelectionAllowed

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

setMultipleItemSelectionAllowed

public 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 boolean isRepeatItemLabels() / public void setRepeatItemLabels(boolean value)
indicates whether the field can repeat items labels The default value is false.

setRepeatItemLabels

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

isIncludeNewItemsInFilter/setIncludeNewItemsInFilter

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

setIncludeNewItemsInFilter

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

isInsertPageBreaksBetweenItems/setInsertPageBreaksBetweenItems

public boolean isInsertPageBreaksBetweenItems() / public 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.

setInsertPageBreaksBetweenItems

public 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 boolean getShowAllItems() / public 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.

setShowAllItems

public 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 boolean isAutoSort() / public void setAutoSort(boolean value)
Indicates whether the specified PivotTable field is automatically sorted.

setAutoSort

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

isAscendSort/setAscendSort

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

setAscendSort

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

getAutoSortField/setAutoSortField

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

setAutoSortField

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

isAutoShow/setAutoShow

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

setAutoShow

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

isAscendShow/setAscendShow

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

setAscendShow

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

getAutoShowCount/setAutoShowCount

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

setAutoShowCount

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

getAutoShowField/setAutoShowField

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

setAutoShowField

public 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 int getFunction() / public void setFunction(int value)
Represents the function used to summarize the PivotTable data field. The value of the property is ConsolidationFunction integer constant.

setFunction

public 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 int getDataDisplayFormat() / public 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

setDataDisplayFormat

public 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

getBaseFieldIndex/setBaseFieldIndex

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

setBaseFieldIndex

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

getBaseItemPosition/setBaseItemPosition

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

setBaseItemPosition

public 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

getBaseItemIndex/setBaseItemIndex

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

setBaseItemIndex

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

getCurrentPageItem/setCurrentPageItem

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

setCurrentPageItem

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

getNumber/setNumber

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

setNumber

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

getInsertBlankRow/setInsertBlankRow

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

setInsertBlankRow

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

getShowSubtotalAtTop/setShowSubtotalAtTop

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

setShowSubtotalAtTop

public 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 boolean getShowInOutlineForm() / public void setShowInOutlineForm(boolean value)
Indicates whether layout this field in outline form on the Pivot Table view

setShowInOutlineForm

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

getNumberFormat/setNumberFormat

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

setNumberFormat

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

getItems

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

getOriginalItems

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

getItemCount

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

getShowCompact/setShowCompact

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

setShowCompact

public void setShowCompact(boolean value)
Indicates whether display labels from the next field in the same column on the Pivot Table view

Method Detail

getPivotFilterByType

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

getPivotFilters

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

initPivotItems

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

getCalculatedFieldFormula

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

setSubtotals

public 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 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.

isHiddenItem

public 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 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 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 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 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 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 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.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy