Aspose::Cells::Pivot::PivotFieldGroupOptions::GetGroupType method

PivotFieldGroupOptions::GetGroupType method

Gets or sets the grouping type for pivot field. Only for grouping date time pivot field.

PivotGroupByType Aspose::Cells::Pivot::PivotFieldGroupOptions::GetGroupType()

Examples

Aspose::Cells::Startup();
// init
PivotFieldGroupOptions pivotFieldGroupOptions;
// Group by year and month together
PivotGroupByType pivotGroupByType = pivotFieldGroupOptions.GetGroupType();
pivotGroupByType = PivotGroupByType::Years | PivotGroupByType::Months;
pivotFieldGroupOptions.SetGroupType(pivotGroupByType);
Aspose::Cells::Cleanup();

See Also