Skip to content

Commit 3f3e5d4

Browse files
committed
Minor refactoring
1 parent 6467a16 commit 3f3e5d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/XlsxFastEditor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,8 @@ private function makeNewSharedString(string $value): int
604604

605605
$uniqueCount = $dom->getElementsByTagName('si')->length;
606606
$dom->firstElementChild->setAttribute('uniqueCount', (string)$uniqueCount);
607+
608+
$this->touchPath(self::SHARED_STRINGS_PATH);
607609
return $uniqueCount - 1; // Base 0
608610
}
609611

@@ -625,7 +627,6 @@ public function writeString(int $sheetNumber, string $cellName, string $value):
625627
$sharedStringId = self::makeNewSharedString($value);
626628
$v->nodeValue = (string)$sharedStringId;
627629
$this->touchWorksheet($sheetNumber);
628-
$this->touchPath(self::SHARED_STRINGS_PATH);
629630
}
630631

631632
/**

0 commit comments

Comments
 (0)