com.aspose.cells

Class PivotTableCollection

  • java.lang.Object
  • All Implemented Interfaces:
    java.lang.Iterable
    public class PivotTableCollection 
    extends CollectionBase

Represents the collection of all the PivotTable objects on the specified worksheet.

Property Getters/Setters Summary
intgetCount()
PivotTableget(intindex)
Gets the PivotTable report by index.
PivotTableget(introw, intcolumn)
Gets the PivotTable report by pivottable's position.
PivotTableget(java.lang.Stringname)
Gets the PivotTable report by pivottable's name.
 
Method Summary
intadd(PivotTable pivotTable, introw, intcolumn, java.lang.StringtableName)
Adds a new PivotTable Object to the collection from another PivotTable.
intadd(PivotTable pivotTable, java.lang.StringdestCellName, java.lang.StringtableName)
Adds a new PivotTable Object to the collection from another PivotTable.
intadd(java.lang.Objectvalue)
Reserved for internal use.
intadd(java.lang.StringsourceData, introw, intcolumn, java.lang.StringtableName)
Adds a new PivotTable cache to a PivotCaches collection.
intadd(java.lang.StringsourceData, introw, intcolumn, java.lang.StringtableName, booleanuseSameSource)
Adds a new PivotTable cache to a PivotCaches collection.
intadd(java.lang.StringsourceData, java.lang.StringdestCellName, java.lang.StringtableName)
Adds a new PivotTable cache to a PivotCaches collection.
intadd(java.lang.StringsourceData, java.lang.StringdestCellName, java.lang.StringtableName, booleanuseSameSource)
Adds a new PivotTable cache to a PivotCaches collection.
intadd(java.lang.String[]sourceData, booleanisAutoPage, PivotPageFields pageFields, introw, intcolumn, java.lang.StringtableName)
Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.
intadd(java.lang.String[]sourceData, booleanisAutoPage, PivotPageFields pageFields, java.lang.StringdestCellName, java.lang.StringtableName)
Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.
voidclear()
Clear all pivot tables.
booleancontains(java.lang.Objectvalue)
Reserved for internal use.
java.lang.Objectget(intindex)
Reserved for internal use.
intindexOf(java.lang.Objectvalue)
Reserved for internal use.
java.util.Iteratoriterator()
voidremove(PivotTable pivotTable)
Deletes the specified PivotTable
voidremoveAt(intindex)
Deletes the PivotTable at the specified index
 

    • Property Getters/Setters Detail

      • getCount

        public int getCount()
        
      • get

        public PivotTable get(int index)
        
        Gets the PivotTable report by index.
      • get

        public PivotTable get(java.lang.String name)
        
        Gets the PivotTable report by pivottable's name.
      • get

        public PivotTable get(int row, int column)
        
        Gets the PivotTable report by pivottable's position.
    • Method Detail

      • add

        public int add(java.lang.String sourceData, java.lang.String destCellName, java.lang.String tableName)
        Adds a new PivotTable cache to a PivotCaches collection.
        Parameters:
        sourceData - The data for the new PivotTable cache.
        destCellName - The cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        Returns:
        The new added cache index.
      • add

        public int add(java.lang.String sourceData, java.lang.String destCellName, java.lang.String tableName, boolean useSameSource)
        Adds a new PivotTable cache to a PivotCaches collection.
        Parameters:
        sourceData - The data for the new PivotTable cache.
        destCellName - The cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        useSameSource - Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.
        Returns:
        The new added cache index.
      • add

        public int add(java.lang.String sourceData, int row, int column, java.lang.String tableName)
        Adds a new PivotTable cache to a PivotCaches collection.
        Parameters:
        sourceData - The data cell range for the new PivotTable.Example : Sheet1!A1:C8
        row - Row index of the cell in the upper-left corner of the PivotTable report's destination range.
        column - Column index of the cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        Returns:
        The new added cache index.
      • add

        public int add(java.lang.String sourceData, int row, int column, java.lang.String tableName, boolean useSameSource)
        Adds a new PivotTable cache to a PivotCaches collection.
        Parameters:
        sourceData - The data cell range for the new PivotTable.Example : Sheet1!A1:C8
        row - Row index of the cell in the upper-left corner of the PivotTable report's destination range.
        column - Column index of the cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        useSameSource - Indicates whether using same data source when another existing pivot table has used this data source. If the property is true, it will save memory.
        Returns:
        The new added cache index.
      • add

        public int add(PivotTable pivotTable, java.lang.String destCellName, java.lang.String tableName)
        Adds a new PivotTable Object to the collection from another PivotTable.
        Parameters:
        pivotTable - The source pivotTable.
        destCellName - The cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        Returns:
        The new added PivotTable index.
      • add

        public int add(PivotTable pivotTable, int row, int column, java.lang.String tableName)
        Adds a new PivotTable Object to the collection from another PivotTable.
        Parameters:
        pivotTable - The source pivotTable.
        row - Row index of the cell in the upper-left corner of the PivotTable report's destination range.
        column - Column index of the cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        Returns:
        The new added PivotTable index.
      • add

        public int add(java.lang.String[] sourceData, boolean isAutoPage, PivotPageFields pageFields, java.lang.String destCellName, java.lang.String tableName)
        Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.
        Parameters:
        sourceData - The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"}
        isAutoPage - Whether auto create a single page field. If true,the following param pageFields will be ignored.
        pageFields - The pivot page field items.
        destCellName - destCellName The name of the new PivotTable report.
        tableName - the name of the new PivotTable report.
        Returns:
        The new added PivotTable index.
      • add

        public int add(java.lang.String[] sourceData, boolean isAutoPage, PivotPageFields pageFields, int row, int column, java.lang.String tableName)
        Adds a new PivotTable Object to the collection with multiple consolidation ranges as data source.
        Parameters:
        sourceData - The multiple consolidation ranges,such as {"Sheet1!A1:C8","Sheet2!A1:B8"}
        isAutoPage - Whether auto create a single page field. If true,the following param pageFields will be ignored
        pageFields - The pivot page field items.
        row - Row index of the cell in the upper-left corner of the PivotTable report's destination range.
        column - Column index of the cell in the upper-left corner of the PivotTable report's destination range.
        tableName - The name of the new PivotTable report.
        Returns:
        The new added PivotTable index.
      • clear

        public void clear()
        Clear all pivot tables.
      • remove

        public void remove(PivotTable pivotTable)
        Deletes the specified PivotTable
        Parameters:
        pivotTable - PivotTable object
      • removeAt

        public void removeAt(int index)
        Deletes the PivotTable at the specified index
        Parameters:
        index - the position index in PivotTable collection
      • iterator

        public java.util.Iterator iterator()
      • get

        public java.lang.Object get(int index)
        Reserved for internal use.
      • contains

        public boolean contains(java.lang.Object value)
        Reserved for internal use.
      • add

        public int add(java.lang.Object value)
        Reserved for internal use.
      • indexOf

        public int indexOf(java.lang.Object value)
        Reserved for internal use.