You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Xls writer, on save, sets selected cell in sheet to last parsed cell with formula and cannot set active sheet (selects multiple sheets when available).
#1250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Xls writer, on save, sets selected cell in sheet to last cell with formula and cannot set active sheet (selects multiple sheets when available).
This is:
- [x] a bug report
- [ ] a feature request
- [x] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
On save() with Xls writer, selected cell(s) should remain selected and selection should not change.
On save() with Xls writer, active sheet should remain active. Only one (active), not multiple sheets should be selected in output file.
What is the current behavior?
On save() with Xls writer, cell(s) selection changes to last parsed sheet cell that contain formula;
This is caused by running \PhpOffice\PhpSpreadsheet\Cell\Cell::getStyle() method (in fact \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getStyle()) in \PhpOffice\PhpSpreadsheet\Calculation\Calculation::_calculateFormulaValue() method.
On save() with Xls writer, output file has selected multiple sheets and active is not the one that was made active before save. Using LibreOffice Calc 6.3.2.2 x86 to open output file.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.
Xls writer, on save, sets selected cell in sheet to last cell with formula and cannot set active sheet (selects multiple sheets when available).
This is:
What is the expected behavior?
What is the current behavior?
This is caused by running \PhpOffice\PhpSpreadsheet\Cell\Cell::getStyle() method (in fact \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getStyle()) in \PhpOffice\PhpSpreadsheet\Calculation\Calculation::_calculateFormulaValue() method.
What are the steps to reproduce?
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet: since 1.7.0
PHP: 7.1.26 and 7.3.11 was used with the same result
The text was updated successfully, but these errors were encountered: