Aspose::Cells::Pivot::PivotFieldGroupOptions::SetGroupType method

PivotFieldGroupOptions::SetGroupType method

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

void Aspose::Cells::Pivot::PivotFieldGroupOptions::SetGroupType(PivotGroupByType value)

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