diff --git a/CHANGELOG.md b/CHANGELOG.md index 58890b68..22b73339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,13 +9,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added -- Support cell comments in HTML writer and reader- [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308) +- Support cell comments in HTML writer and reader - [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308) - Option to stop at a conditional styling, if it matches (only XLSX format) - [#292](https://github.com/PHPOffice/PhpSpreadsheet/pull/292) ### Fixed - Better auto-detection of CSV separators - [#305](https://github.com/PHPOffice/PhpSpreadsheet/issues/305) - Support for shape style ending with `;` - [#304](https://github.com/PHPOffice/PhpSpreadsheet/issues/304) +- Freeze Panes takes wrong coordinates for XLSX - [#322](https://github.com/PHPOffice/PhpSpreadsheet/issues/322) ## [1.0.0] - 2017-12-25 diff --git a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php index 2257e075..298f97ab 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -1603,8 +1603,8 @@ class Worksheet extends BIFFwriter return; } - $y = isset($panes[0]) ? $panes[0] : null; - $x = isset($panes[1]) ? $panes[1] : null; + $x = isset($panes[0]) ? $panes[0] : null; + $y = isset($panes[1]) ? $panes[1] : null; $rwTop = isset($panes[2]) ? $panes[2] : null; $colLeft = isset($panes[3]) ? $panes[3] : null; if (count($panes) > 4) { // if Active pane was received diff --git a/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php b/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php index 9d2a594c..8c0644d5 100644 --- a/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php +++ b/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php @@ -21,8 +21,8 @@ class FreezePaneTest extends AbstractFunctional */ public function testFreezePane($format) { - $cellSplit = 'B2'; - $topLeftCell = 'E5'; + $cellSplit = 'B4'; + $topLeftCell = 'E7'; $spreadsheet = new Spreadsheet(); $spreadsheet->getActiveSheet()->freezePane($cellSplit, $topLeftCell);