code: public function setWorksheet(Worksheet $value = null)
      {
          if ($value !== null) {
              $this->worksheet = $value;
          }
  
          return $this;
      }
docs: Set worksheet.
  
  @param Worksheet $value
  
  @return NamedRange