code: public function setAutoFilter($pValue)
      {
          if (is_string($pValue)) {
              $this->autoFilter->setRange($pValue);
          } elseif (is_object($pValue) && ($pValue instanceof AutoFilter)) {
              $this->autoFilter = $pValue;
          }
  
          return $this;
      }
docs: Set AutoFilter.
  
  @param AutoFilter|string $pValue
  A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility
  
  @throws Exception
  
  @return Worksheet