code: public function getIndex(Worksheet $pSheet)
      {
          foreach ($this->workSheetCollection as $key => $value) {
              if ($value->getHashCode() == $pSheet->getHashCode()) {
                  return $key;
              }
          }
  
          throw new Exception('Sheet does not exist.');
      }
docs: Get index for sheet.
  
  @param Worksheet $pSheet
  
  @throws Exception
  
  @return int index