code: public function setHyperlink(Hyperlink $pHyperlink = null)
      {
          if (!isset($this->parent)) {
              throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
          }
  
          $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);
  
          return $this->updateInCollection();
      }
docs: Set Hyperlink.
  
  @param Hyperlink $pHyperlink
  
  @throws Exception
  
  @return Cell