Dear Aspose Team,
Please let me know if we can add a grouping in a pivot table using Aspose.cells v6. In Excel, the functionality can be accomplished by right clicking the pivot field and create a grouping or by using Data> Grouping tab.
Please let me know if there is an equivalent api for this.
Thanks,
Hi,
Thanks Amjad for the reply.
I would like to know if a grouping in a pivot table is possible, as against the grouping of rows/columns.
By this, I meant that set of values in a pivot table be grouped to a new value.
Thanks again
Hi,
Thanks Amjad for your reply. Please let me know when this feature will be included.
Thanks
Hi,
Thanks Amjad for your reply. I would be awaiting for it .
Thanks,
Hi,
We have fixed this issue. Please download: Aspose.Cells for .NET v7.0.0.1
C#
//set autogroup field
pivotTable.SetAutoGroupField(0);
//set manual group field
ArrayList list = new ArrayList();
list.Add(PivotGroupByType.RangeOfValues);
pivotTable.SetManualGroupField(0, 2, 5, list, 2);
list = new ArrayList();
list.Add(PivotGroupByType.Years);
DateTime start = new DateTime(1930, 6, 2);
DateTime end = new DateTime(1931, 9, 10);
pivotTable.SetManualGroupField(0, start, end, list, 1);
//ungroup
pivotTable.SetUngroup(0);