public function setGrouping($pGrouping)
    {
        if (($pGrouping !== null) &&
            (!in_array($pGrouping, self::$dateTimeGroups)) &&
            (!in_array($pGrouping, self::$dynamicTypes)) &&
            (!in_array($pGrouping, self::$topTenType))) {
            throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.');
        }
        $this->grouping = $pGrouping;

        return $this;
    }