Skip to content

Commit 6537a29

Browse files
committed
fix issue 2677
1 parent 09cf6ab commit 6537a29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpSpreadsheet/Reader/Xlsx.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,8 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet
898898
foreach ($item->attributes() ?? [] as $attr) {
899899
$node->addAttribute($attr->getName(), $attr);
900900
}
901-
$node->addAttribute('sqref', $item->children('xm', true)->sqref);
902-
$node->addChild('formula1', $item->formula1->children('xm', true)->f);
901+
$node->addAttribute('sqref', $item->children('xm', true)->sqref ?? '');
902+
$node->addChild('formula1', $item->formula1->children('xm', true)->f ?? '');
903903
}
904904
}
905905

0 commit comments

Comments
 (0)