Create a Pivot Table
Contents
[
Hide
]
Create a Pivot Table
Aspose.Cells for Python via Java provides the feature to create pivot tables. To create a pivot table using Aspose.Cells, please follow the steps below:
- Add some data to worksheet cells by using the Cell object’s setValue property. This data will be used as a data source for the pivot table.
- Add a pivot table to the worksheet by calling the PivotTableCollectionadd method, encapsulated in the Worksheet object.
- Access the PivotTable object from the PivotTableCollectionby passing the PivotTable index.
- Use any of the pivot table objects (explained above) encapsulated in the PivotTableCollectionobject to manage the pivot table.
The following code snippet demonstrates creating a pivot table with the Aspose.Cells API.