-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editing Xlsx document does not preserve workbook attributes #523
Comments
FYI. I am working on a PR for this issue. |
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
May 31, 2018
Fix for issue PHPOffice#523. When reading then writing a Xlsx spreadsheet, preserve the workbook bookview attributes for the spreadsheet, (e.g., the attribute that hides worksheet tabs.) Beforehand, these attributes were always being set to fixed constants.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
May 31, 2018
Made the following changes to fix PHPOffice#523 based on code-review comments. * Updating workbook attributes is now done via a loop. * Unit test no longer requires an input xlsx document.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 12, 2018
In response to feedback, the fix for issue PHPOffice#523 has been completely rewritten. This fix preserves workbook view attributes when one reads and writes Xlsx documents. The old code did this by storing all workbook attributes in a single map. The new code stores each attribute as a separate property with its own gettor and settor methods.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 12, 2018
Fix for issue PHPOffice#523. When reading then writing a Xlsx spreadsheet, preserve the workbook bookview attributes for the spreadsheet, (e.g., the attribute that hides worksheet tabs.) Beforehand, these attributes were always being set to fixed constants.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 12, 2018
Made the following changes to fix PHPOffice#523 based on code-review comments. * Updating workbook attributes is now done via a loop. * Unit test no longer requires an input xlsx document.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 12, 2018
In response to feedback, the fix for issue PHPOffice#523 has been completely rewritten. This fix preserves workbook view attributes when one reads and writes Xlsx documents. The old code did this by storing all workbook attributes in a single map. The new code stores each attribute as a separate property with its own gettor and settor methods.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 13, 2018
Fix for issue PHPOffice#523. When reading then writing a Xlsx spreadsheet, preserve the workbook bookview attributes for the spreadsheet, (e.g., the attribute that hides worksheet tabs.) Beforehand, these attributes were always being set to fixed constants.
billblume
added a commit
to billblume/PhpSpreadsheet
that referenced
this issue
Jun 13, 2018
Made the following changes to fix PHPOffice#523 based on code-review comments. * Updating workbook attributes is now done via a loop. * Unit test no longer requires an input xlsx document.
Thanks for this great addition ! I moved the tests as functional test and merged it. |
Dfred
pushed a commit
to Dfred/PhpSpreadsheet
that referenced
this issue
Nov 20, 2018
Editing a Xlsx document using PhpSpreadsheet should preserve the workbook view attributes of that document. For example, if the worksheet tabs are hidden in the original document, they should remain hidden after updating. Fixes PHPOffice#523 Fixes PHPOffice#525
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is:
What is the expected behavior?
Editing a Xlsx document using PhpSpreadsheet should preserve the workbook view attributes of that document. For example, if the worksheet tabs are hidden in the original document, they should remain hidden after updating.
What is the current behavior?
Editing a Xlsx document resets most workbook attributes to hardwired values.
See Writer\Xlsx\Workbook::writeBookViews. All workbook attributes except for 'activeTabs' are hardwired constants. For example, 'showSheetTabs' is always set to '1', meaning that worksheet tabs are always visible after updating.
What are the steps to reproduce?
Which versions of PhpSpreadsheet and PHP are affected?
This occurs in all versions of PhpSpreadsheet. This also occurs in PhpExcel.
The text was updated successfully, but these errors were encountered: