mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-11 02:26:28 +00:00
Small Optimization
This commit is contained in:
@@ -947,16 +947,16 @@ class Xlsx extends BaseReader
|
||||
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user