diff --git a/Classes/PHPExcel/Shared/Date.php b/Classes/PHPExcel/Shared/Date.php index 01695392..1d44463b 100644 --- a/Classes/PHPExcel/Shared/Date.php +++ b/Classes/PHPExcel/Shared/Date.php @@ -256,6 +256,10 @@ class PHPExcel_Shared_Date return true; } + // Typically number, currency or accounting (or occasionally fraction) formats + if ((substr($pFormatCode,0,1) == '_') || (substr($pFormatCode,0,2) == '0 ')) { + return false; + } // Try checking for any of the date formatting characters that don't appear within square braces if (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i',$pFormatCode)) { return true; diff --git a/changelog.txt b/changelog.txt index ffc201a4..65659539 100644 --- a/changelog.txt +++ b/changelog.txt @@ -46,6 +46,8 @@ Fixed in SVN: - Bugfix: (MBaker) Workitem 14256 - Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit - Bugfix: (MBaker) Workitem 14086 - Named range with sheet name that contains the $ throws exception when getting the cell - Bugfix: (MBaker) Added autoloader to DefaultValueBinder and AdvancedValueBinder +- Bugfix: (MBaker) Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with "_" or with "0 " to prevent false positives + These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats 2010-08-26 (v1.7.4):