Custom sorting in Pivot Table

Custom sorting in Pivot Table

By using the Aspose.Cells 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 does not use custom sorting, the second pivot table is sorted by “SeaFood” row‑field values, and the third pivot table is sorted by “28/07/2000” column‑field values.

The sample source file and output files can be downloaded from the links below to test the sample code:

Source Excel File

Output Excel File

Output PDF File