Custom sorting in Pivot Table

How to Set Custom Sorting in Pivot Table Using Aspose.Cells for Python Excel Library

By using the Aspose.Cells for Python via .NET API, you can sort Pivot Tables on field values. The following code snippet loads the sample excel file and adds three pivot tables. The first pivot table is without custom sorting, the second pivot table is sorted on “SeaFood” row field values and the third pivot table is sorted on “28/07/2000” column field values.

Sample source file and output files can be downloaded from here for testing the sample code:

Source Excel File

Output Excel File

Output PDF File

Sample Code