Skip to content

Commit

Permalink
Very Minor Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman committed Aug 30, 2024
1 parent 8249cbd commit 60ca6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/Cell/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ public function setValueExplicit(mixed $value, string $dataType = DataType::TYPE
self::updateIfCellIsTableHeader($this->getParent()?->getParent(), $this, $oldValue, $value);
$worksheet = $this->getWorksheet();
$spreadsheet = $worksheet->getParent();
$originalSelected = $worksheet->getSelectedCells();
if (isset($spreadsheet)) {
$originalSelected = $worksheet->getSelectedCells();
$activeSheetIndex = $spreadsheet->getActiveSheetIndex();
$style = $this->getStyle();
$oldQuotePrefix = $style->getQuotePrefix();
if ($oldQuotePrefix != $quotePrefix) {
if ($oldQuotePrefix !== $quotePrefix) {
$style->setQuotePrefix($quotePrefix);
}
$worksheet->setSelectedCells($originalSelected);
Expand Down

0 comments on commit 60ca6c7

Please sign in to comment.