diff --git a/Classes/PHPExcel/Style/NumberFormat.php b/Classes/PHPExcel/Style/NumberFormat.php index 18feee25..f4e957dc 100644 --- a/Classes/PHPExcel/Style/NumberFormat.php +++ b/Classes/PHPExcel/Style/NumberFormat.php @@ -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 { diff --git a/changelog.txt b/changelog.txt index c9db10d0..3ab43660 100644 --- a/changelog.txt +++ b/changelog.txt @@ -35,6 +35,7 @@ Fixed in SVN: - Feature: (MBaker) Added Contiguous flag for the CSV Reader, when working with Read Filters - Feature: (MBaker) Added getFormattedValue() method for cell object - Feature: (MBaker) Added strictNullComparison argument to the worksheet fromArray() method +- Feature: (MBaker) Fix to toFormattedString() method in PHPExcel_Style_NumberFormat to handle fractions with a # code for the integer part - Bugfix: (MB) Work item 14143 - NA() doesn't propagate in matrix calc - quick fix in JAMA/Matrix.php - Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : String constant containing double quotation mark - Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Percent