code: public function getSheetByName($pName)
      {
          $worksheetCount = count($this->workSheetCollection);
          for ($i = 0; $i < $worksheetCount; ++$i) {
              if ($this->workSheetCollection[$i]->getTitle() === $pName) {
                  return $this->workSheetCollection[$i];
              }
          }
  
          return null;
      }
docs: Get sheet by name.
  
  @param string $pName Sheet name
  
  @return Worksheet