mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-18 22:16:46 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user