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:
Mark Baker
2010-12-06 12:42:16 +00:00
parent 756e587bc9
commit 9cacc2fda7
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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 {