Open larryfan2023 opened 1 month ago
@larryfan2023,
Thanks for the screenshot.
Please try to use the PivotField.IsAutoSort Boolean attribute and set it to "true" to perform the desired sorting for the pivot row field. e.g., Sample code:
// Access the Row field and set the sort order
PivotField rowField = pivotTable.RowFields[0];
rowField.IsAutoSort = true;
rowField.IsAscendSort = true;
Hope, this helps a bit.
We also recommend posting your queries in the dedicated forum.
I'm using Aspose.Cells to create Excel PivotTable. I want to set the Field List option to Sort A to Z in Display tab in PivotTable Options, see my attached screenshot. I searched documentation and post but couldn't find API that can be utilized for this purpose.
Could you please advise me if there's such capability in Aspose.Cells or I should seek for workaround?
Thanks.