Skip to content

Commit 367c22c

Browse files
committed
Slight Improvement to PR PHPOffice#4132
PR PHPOffice#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.
1 parent f7c183b commit 367c22c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3724,10 +3724,8 @@ public function applyStylesFromArray(string $coordinate, array $styleArray): boo
37243724
}
37253725
$activeSheetIndex = $spreadsheet->getActiveSheetIndex();
37263726
$originalSelected = $this->selectedCells;
3727-
$originalActive = $this->activeCell;
37283727
$this->getStyle($coordinate)->applyFromArray($styleArray);
3729-
$this->activeCell = $originalActive;
3730-
$this->selectedCells = $originalSelected;
3728+
$this->setSelectedCells($originalSelected);
37313729
if ($activeSheetIndex >= 0) {
37323730
$spreadsheet->setActiveSheetIndex($activeSheetIndex);
37333731
}

0 commit comments

Comments
 (0)