code: 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;
      }
docs: Set AutoFilter Rule Grouping.
  
  @param string $pGrouping
  
  @throws PhpSpreadsheetException
  
  @return Rule