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
Sorry reopening because I posted some invalid php and the old issue was closed.
This is:
- [x ] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
I expect for the column containing "Duration" should come in as "mm" format as defined in excel. Meaning it should look like an integer as you see when you are in excel.
The column subtracts one date from another date.
I.e.
2018-01-22 02:00:00 PM - 2018-01-22 01:00:00 PM
We format is as [mm] so it would be 60.
I think what is happening is this library doesn't know how to do binary operations with dates. If you multiple the decimal number by 1440 you get the correct number. Or it isn't formatting it correctly.
What is the current behavior?
Duration column comes in as a decimal in the php code.
Sorry reopening because I posted some invalid php and the old issue was closed.
This is:
What is the expected behavior?
I expect for the column containing "Duration" should come in as "mm" format as defined in excel. Meaning it should look like an integer as you see when you are in excel.
The column subtracts one date from another date.
I.e.
2018-01-22 02:00:00 PM - 2018-01-22 01:00:00 PM
We format is as [mm] so it would be 60.
I think what is happening is this library doesn't know how to do binary operations with dates. If you multiple the decimal number by 1440 you get the correct number. Or it isn't formatting it correctly.
What is the current behavior?
Duration column comes in as a decimal in the php code.
What are the steps to reproduce?
Import the following file with phpspreadsheet:
importtest-phpspreadsheet.xlsx
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Current output:
Should be 60
Actual: 0.041666666671517
Expected output:
Should be 60
Actual: 60
If you open the spreadsheet in excel, cell K2 is in fact 60.
Which versions of PhpSpreadsheet and PHP are affected?
PHP 5.6, Latest phpspreadsheet from composer
The text was updated successfully, but these errors were encountered: