We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is:
- [X] a bug report
Cell value is: 12:34 Formatting is: [mm]:ss
Per: https://support.office.com/en-us/article/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 this is Elapsed time (minutes and seconds)
[mm] is stripped from formatting here:
PhpSpreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php
Line 641 in ce4b864
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:
<?php require __DIR__ . '/vendor/autoload.php'; // Create new Spreadsheet object $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet(); // add code that show the issue here... use PhpOffice\PhpSpreadsheet\Style\NumberFormat; $value = 0.0087268518518519; $format = '[mm]:ss'; NumberFormat::toFormattedString( $value, $format )
1.2.0 PHP 7.0.26-2+ubuntu14.04.1+deb.sury.org+2
bug-report.xlsx
$spreadsheet = $reader->load('bug-report.xlsx'); $spreadsheet->getActiveSheet()->getCell('A1')->getFormattedValue();
The text was updated successfully, but these errors were encountered:
This is a duplicate of #342. Please try to contribute over there if this is important to you.
Sorry, something went wrong.
Fix time format for duration was incorrect
699da09
When using format `[h]:mm` it should convert to the "total hours:minutes" Closes #666 Fixes #664 Fixes #446 Fixes #342
ec617ca
When using format `[h]:mm` it should convert to the "total hours:minutes" Closes PHPOffice#666 Fixes PHPOffice#664 Fixes PHPOffice#446 Fixes PHPOffice#342
No branches or pull requests
This is:
What is the expected behavior?
Cell value is:
12:34
Formatting is:
[mm]:ss
Per: https://support.office.com/en-us/article/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68 this is Elapsed time (minutes and seconds)
What is the current behavior?
[mm] is stripped from formatting here:
PhpSpreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php
Line 641 in ce4b864
What are the steps to reproduce?
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:
Which versions of PhpSpreadsheet and PHP are affected?
1.2.0
PHP 7.0.26-2+ubuntu14.04.1+deb.sury.org+2
Sample File
bug-report.xlsx
The text was updated successfully, but these errors were encountered: