Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Freeze Panes takes wrong coordinates #322
What is the expected behavior?
When I set a cell XY to freeze panes the following should happen:
What is the current behavior?
For example if I set freeze to D7 (from coordinates 4,7), the cell referenced to the freeze is G4 (from coordinates 7,4).
What are the steps to reproduce?
Just try to freeze on D7 and the output will be freeze on 7,4.
<?php use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Color; use PhpOffice\PhpSpreadsheet\Style\Alignment; (...) // Create new Spreadsheet object $spreadsheet = new Spreadsheet(); (...) // with coordinates: $spreadsheet->getActiveSheet()->freezePaneByColumnAndRow(7,4); // with cell name: $spreadsheet->getActiveSheet()->freezePane('D7'); (...)
If I change this code in file vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php:
to this one:
... all works ok.
Which versions of PhpSpreadsheet and PHP are affected?
Installed via composer: