Skip to content

Commit

Permalink
Small Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman committed Aug 31, 2024
1 parent 60ca6c7 commit 16e5573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/Reader/Xlsx.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,16 +947,16 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet

// Style information?
if (!$this->readDataOnly) {
$holdSelected = $docSheet->getSelectedCells();
$cAttrS = (int) ($cAttr['s'] ?? 0);
// no style index means 0, it seems
$cAttrS = isset($styles[$cAttrS]) ? $cAttrS : 0;
$cell->setXfIndex($cAttrS);
// issue 3495
if ($cellDataType === DataType::TYPE_FORMULA && $styles[$cAttrS]->quotePrefix === true) {
$holdSelected = $docSheet->getSelectedCells();
$cell->getStyle()->setQuotePrefix(false);
$docSheet->setSelectedCells($holdSelected);
}
$docSheet->setSelectedCells($holdSelected);
}
}
++$rowIndex;
Expand Down

0 comments on commit 16e5573

Please sign in to comment.