diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php b/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php index 9e6aeaf788..106fd44efc 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php @@ -41,7 +41,7 @@ private function setHyperlink(SimpleXMLElement $hyperlink, Worksheet $worksheet) foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { $cell = $worksheet->getCell($cellReference); if (isset($linkRel['id'])) { - $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']]; + $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']] ?? null; if (isset($hyperlink['location'])) { $hyperlinkUrl .= '#' . (string) $hyperlink['location']; }