Slight Improvement to PR #4132

PR #4132 was needed for release 2.2.2 because of a problem with Excel 2016 introduced with 2.2.0. This is a minor tweak to that change - a little simpler, and possibly beneficial if the spreadsheet uses split screens.
This commit is contained in:
oleibman
2024-08-30 00:40:02 -07:00
parent f7c183b8ed
commit 367c22c67e
+1 -3
View File
@@ -3724,10 +3724,8 @@ class Worksheet implements IComparable
}
$activeSheetIndex = $spreadsheet->getActiveSheetIndex();
$originalSelected = $this->selectedCells;
$originalActive = $this->activeCell;
$this->getStyle($coordinate)->applyFromArray($styleArray);
$this->activeCell = $originalActive;
$this->selectedCells = $originalSelected;
$this->setSelectedCells($originalSelected);
if ($activeSheetIndex >= 0) {
$spreadsheet->setActiveSheetIndex($activeSheetIndex);
}