-
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
Ods writer and reader handle bool values differently (with diff of potential fix) #460
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Well, the issue is still unresolved and present, so I wonder if it is wise to close it despite no-one has responded yet. |
Reopening, expect a fix in a day or two. |
Fix PHPOffice#460. Another in the "better late than never" series, closed as stale in June 2018. Ods Writer and Ods Reader handle booleans differently; what is worse, neither of them do it correctly. They will now match the behavior of LibreOffice. Reporter said that part of the xml would vary depending on locale; I believe that part is never actually used, but I do emulate that behavior.
This is:
What is the expected behavior?
Ods reader should read boolean values properly.
What is the current behavior?
Ods reader can not read a boolean value created via Ods Writer.
What are the steps to reproduce?
Can be fixed with
src/PhpSpreadsheet/Reader/Ods.php
(at line 529):Which versions of PhpSpreadsheet and PHP are affected?
Probably all?
Elaboration on the generated and expected XML contents in the Ods file.
The PhpSpreadsheet Ods reader for a boolean cell expects (formatted for better readability):
The generated content by PhpSpreadsheet Ods writer for a boolean cell is (formatted for better readability):
The generated content by LibreOffice 6.0.2.1.0+ with non english locale (German in this case) for a boolean cell is (formatted for better readability):
Hence the hard coded value of
TRUE
is not good at all.The text was updated successfully, but these errors were encountered: