mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-25 01:31:26 +00:00
Feature: (MBaker) Fix to toFormattedString() method in PHPExcel_Style_NumberFormat to handle fractions with a # code for the integer part
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@64874 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -649,7 +649,7 @@ class PHPExcel_Style_NumberFormat implements PHPExcel_IComparable
|
||||
$adjustedDecimalPart = $decimalPart/$GCD;
|
||||
$adjustedDecimalDivisor = $decimalDivisor/$GCD;
|
||||
|
||||
if ((strpos($format,'0') !== false) || (substr($format,0,3) == '? ?')) {
|
||||
if ((strpos($format,'0') !== false) || (strpos($format,'#') !== false) || (substr($format,0,3) == '? ?')) {
|
||||
if ($integerPart == 0) { $integerPart = ''; }
|
||||
$value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user