Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PivotTableCollection

    Show / Hide Table of Contents

    Class PivotTableCollection

    Represents collection of IPivotTable in the worksheet.

    Inheritance
    System.Object
    CollectionBase<System.Object>
    CollectionBaseEx<System.Object>
    PivotTableCollection
    Implements
    System.Collections.Generic.IList<System.Object>
    System.Collections.Generic.ICollection<System.Object>
    System.Collections.Generic.IEnumerable<System.Object>
    IParentApplication
    ICloneParent
    System.Collections.Generic.IEnumerable<PivotTableImpl>
    System.Collections.IEnumerable
    IPivotTables
    Inherited Members
    CollectionBaseEx<Object>.add_Clearing(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<Object>.remove_Clearing(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<Object>.add_Cleared(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<Object>.remove_Cleared(CollectionBaseEx.CollectionClear<>)
    CollectionBaseEx<Object>.add_Inserting(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.remove_Inserting(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.add_Inserted(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.remove_Inserted(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.add_Removing(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.remove_Removing(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.add_Removed(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.remove_Removed(CollectionBaseEx.CollectionChange<>)
    CollectionBaseEx<Object>.add_Setting(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<Object>.remove_Setting(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<Object>.add_Set(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<Object>.remove_Set(CollectionBaseEx.CollectionSet<>)
    CollectionBaseEx<Object>.OnClear()
    CollectionBaseEx<Object>.OnClearComplete()
    CollectionBaseEx<Object>.OnInsert(Int32, Object)
    CollectionBaseEx<Object>.OnInsertComplete(Int32, Object)
    CollectionBaseEx<Object>.OnRemove(Int32, Object)
    CollectionBaseEx<Object>.OnRemoveComplete(Int32, Object)
    CollectionBaseEx<Object>.OnSet(Int32, Object, Object)
    CollectionBaseEx<Object>.OnSetComplete(Int32, Object, Object)
    CollectionBaseEx<Object>.FindParent(Type)
    CollectionBaseEx<Object>.FindParent(Type, Boolean)
    CollectionBaseEx<Object>.SetParent(Object)
    CollectionBaseEx<Object>.EnsureCapacity(Int32)
    CollectionBaseEx<Object>.ClearMaxValues()
    CollectionBaseEx<Object>.GenerateDefaultName(ICollection<Object>, String)
    CollectionBaseEx<Object>.GenerateDefaultName(ICollection, String)
    CollectionBaseEx<Object>.GenerateDefaultName(String, ICollection[])
    CollectionBaseEx<Object>.ChangeName(IDictionary, ValueChangedEventArgs)
    CollectionBaseEx<Object>.Application
    CollectionBaseEx<Object>.Parent
    CollectionBaseEx<Object>.QuietMode
    CollectionBaseEx<Object>.AppImplementation
    CollectionBaseEx<Object>.Changed
    CollectionBaseEx<Object>.Clearing
    CollectionBaseEx<Object>.Cleared
    CollectionBaseEx<Object>.Inserting
    CollectionBaseEx<Object>.Inserted
    CollectionBaseEx<Object>.Removing
    CollectionBaseEx<Object>.Removed
    CollectionBaseEx<Object>.Setting
    CollectionBaseEx<Object>.Set
    CollectionBase<Object>.Clear()
    CollectionBase<Object>.Insert(Int32, Object)
    CollectionBase<Object>.IndexOf(Object)
    CollectionBase<Object>.Add(Object)
    CollectionBase<Object>.Contains(Object)
    CollectionBase<Object>.CopyTo(Object[], Int32)
    CollectionBase<Object>.Remove(Object)
    CollectionBase<Object>.Capacity
    CollectionBase<Object>.Count
    CollectionBase<Object>.InnerList
    CollectionBase<Object>.List
    CollectionBase<Object>.IsReadOnly
    Namespace: Syncfusion.XlsIO.Implementation.PivotTables
    Assembly: Syncfusion.XlsIO.Portable.dll
    Syntax
    public class PivotTableCollection : CollectionBaseEx<object>, IList<object>, ICollection<object>, IEnumerable<object>, IParentApplication, ICloneParent, IEnumerable<PivotTableImpl>, IEnumerable, IPivotTables

    Constructors

    PivotTableCollection(IApplication, Object)

    Initializes a new instance of PivotTableCollection.

    Declaration
    public PivotTableCollection(IApplication application, object parent)
    Parameters
    Type Name Description
    IApplication application

    Application object that represents the Excel application.

    System.Object parent

    Parent object of this collection.

    Properties

    Item[Int32]

    Gets a pivot table from the collection with the specified index.

    Declaration
    public IPivotTable this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    Zero-based index of the pivot table.

    Property Value
    Type Description
    IPivotTable

    Item[String]

    Gets a pivot table from the collection with the specified name.

    Declaration
    public IPivotTable this[string name] { get; }
    Parameters
    Type Name Description
    System.String name

    Name of the pivot table.

    Property Value
    Type Description
    IPivotTable

    ParentWorksheet

    Gets the parent worksheet of this collection. Read-only.

    Declaration
    public WorksheetImpl ParentWorksheet { get; }
    Property Value
    Type Description
    WorksheetImpl

    Methods

    Add(PivotTableImpl)

    Adds specified table to the collection.

    Declaration
    public void Add(PivotTableImpl table)
    Parameters
    Type Name Description
    PivotTableImpl table

    Table to add.

    Add(String, IRange, IPivotCache)

    Adds a pivot table to the collection.

    Declaration
    public IPivotTable Add(string name, IRange location, IPivotCache cache)
    Parameters
    Type Name Description
    System.String name

    Name of the pivot table.

    IRange location

    Pivot table location.

    IPivotCache cache

    Pivot cache of the pivot table.

    Returns
    Type Description
    IPivotTable

    Returns the pivot table object.

    Examples

    Following code snippet illustrates how to add a pivot table.

    ExcelEngine excelEngine = new ExcelEngine();
    IApplication application = excelEngine.Excel;
    IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
    IWorksheet worksheet = workbook.Worksheets[0];
    // Create Pivot cache with the given data rangeS
    IPivotCache cache = workbook.PivotCaches.Add(worksheet["A1:H50"]);  
    //Create "PivotTable1" with the cache at the specified range
    IPivotTable pivotTable = worksheet.PivotTables.Add("PivotTable1", worksheet["A1"], cache);

    Clone(WorksheetImpl, Dictionary<String, String>)

    Creates copy of the current collection.

    Declaration
    public PivotTableCollection Clone(WorksheetImpl worksheet, Dictionary<string, string> hashWorksheetNames)
    Parameters
    Type Name Description
    WorksheetImpl worksheet

    Parent worksheet for the new collection.

    System.Collections.Generic.Dictionary<System.String, System.String> hashWorksheetNames
    Returns
    Type Description
    PivotTableCollection

    Created collection.

    Clone(Object)

    Creates a new object that is a copy of the current instance.

    Declaration
    public object Clone(object parent)
    Parameters
    Type Name Description
    System.Object parent

    Parent object for a copy of this instance.

    Returns
    Type Description
    System.Object

    A new object that is a copy of this instance.

    GetEnumerator()

    Returns the IEnumerable list of pivot tables in the worksheet.

    Declaration
    public IEnumerator<PivotTableImpl> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<PivotTableImpl>

    Parse(IList, Int32)

    Parses collection of pivot tables.

    Declaration
    public int Parse(IList data, int iPos)
    Parameters
    Type Name Description
    System.Collections.IList data

    Records with pivot table data.

    System.Int32 iPos

    Offset to the first pivot table record.

    Returns
    Type Description
    System.Int32

    Offset to the record after

    Remove(String)

    Removes pivot table with specified name from this collection.

    Declaration
    public void Remove(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the pivot table to remove.

    RemoveAt(Int32)

    Removes a pivot table with the specified index from this collection.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the pivot table to remove.

    Serialize(OffsetArrayList)

    Saves the collection of pivot tables into OffsetArrayList.

    Declaration
    public void Serialize(OffsetArrayList records)
    Parameters
    Type Name Description
    OffsetArrayList records

    OffsetArrayList that will get all collection's records.

    Implements

    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    IParentApplication
    ICloneParent
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    IPivotTables
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved