## PivotFieldGroupOptions::GetGroupType method


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

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


## Examples


```cpp
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

* Enum [PivotGroupByType](../../pivotgroupbytype/)
* Class [PivotFieldGroupOptions](../)
* Namespace [Aspose::Cells::Pivot](../../)
* Library [Aspose.Cells for C++](../../../)
