-
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
PhpOffice\PhpSpreadsheet\Exception: Invalid datatype: d #2373
Comments
My generated excel file had errors on a certain sheet after the latest patch 1.19.0 too |
Hi all I'm facing the same issue trying to load a xlsx file what I've done to correct it is to add the datatype on the file \PhpOffice\PhpSpreadsheet\Cell\DataType |
fixed for me in the latest patch |
Fix PHPOffice#2373. Excel can handle DateTime/Date/Time as a string if the datatype of the cell is set to "d". The string is, apparently, supposed to follow the ISO8601 spec. Openpyxl can be configured to generate a file with such values, so I've added support and set up unit tests. Excel, naturally, converts such a string input into its numeric representation of the date/time stamp. So will PhpSpreadsheet, so a call to setValueExplicit specifying Date format will actually see the cell wind up with Numeric format - there is no way (and no reason) for the Date type to 'stick'.
Fix #2373. Excel can handle DateTime/Date/Time as a string if the datatype of the cell is set to "d". The string is, apparently, supposed to follow the ISO8601 spec. Openpyxl can be configured to generate a file with such values, so I've added support and set up unit tests. Excel, naturally, converts such a string input into its numeric representation of the date/time stamp. So will PhpSpreadsheet, so a call to setValueExplicit specifying Date format will actually see the cell wind up with Numeric format - there is no way (and no reason) for the Date type to 'stick'.
Hello
I am using v1.19.0
I am openning an existing Xlsx file and I want to write something in a new sheet
The following error occurs:
I can share the file in private
The text was updated successfully, but these errors were encountered: