Minor tweak

This commit is contained in:
MarkBaker 2022-09-25 13:02:01 +02:00
parent eb91890f8b
commit 77a064f58d
1 changed files with 1 additions and 1 deletions

View File

@ -877,7 +877,7 @@ class ReferenceHelper
foreach ($spreadsheet->getWorksheetIterator() as $sheet) { foreach ($spreadsheet->getWorksheetIterator() as $sheet) {
foreach ($sheet->getCoordinates(false) as $coordinate) { foreach ($sheet->getCoordinates(false) as $coordinate) {
$cell = $sheet->getCell($coordinate); $cell = $sheet->getCell($coordinate);
if (($cell !== null) && ($cell->getDataType() === DataType::TYPE_FORMULA)) { if ($cell->getDataType() === DataType::TYPE_FORMULA) {
$formula = $cell->getValue(); $formula = $cell->getValue();
if (strpos($formula, $oldName) !== false) { if (strpos($formula, $oldName) !== false) {
$formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula); $formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula);