diff --git a/Classes/PHPExcel/Writer/Excel5/Parser.php b/Classes/PHPExcel/Writer/Excel5/Parser.php index 981f8e6..1733ac4 100644 --- a/Classes/PHPExcel/Writer/Excel5/Parser.php +++ b/Classes/PHPExcel/Writer/Excel5/Parser.php @@ -522,7 +522,7 @@ class PHPExcel_Writer_Excel5_Parser */ function _convert($token) { - if (preg_match("/^\"[^\"]{0,255}\"$/", $token)) { + if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $token)) { return $this->_convertString($token); } elseif (is_numeric($token)) { @@ -1231,7 +1231,7 @@ class PHPExcel_Writer_Excel5_Parser return $token; } // If it's a string (of maximum 255 characters) - elseif (preg_match("/^\"[^\"]{0,255}\"$/",$token)) + elseif (preg_match("/\"([^\"]|\"\"){0,255}\"/",$token) and $this->_lookahead != '"' and (substr_count($token, '"')%2 == 0)) { return $token; } @@ -1323,8 +1323,8 @@ class PHPExcel_Writer_Excel5_Parser function _expression() { // If it's a string return a string node - if (preg_match("/^\"[^\"]{0,255}\"$/", $this->_current_token)) { - $result = $this->_createTree($this->_current_token, '', ''); + if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->_current_token)) { + $result = $this->_createTree(str_replace('""', '"', $this->_current_token), '', ''); $this->_advance(); return $result; // If it's an error code diff --git a/changelog.txt b/changelog.txt index 14a6ea1..cc1262b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -24,6 +24,7 @@ Fixed in SVN: +- Bugfix: (Progi1984) Workitem 7895 - Excel5 : Formula : String constant containing double quotation mark - Feature: (MBaker) Work item 8769 - Implement Gnumeric File Format Initial work on Gnumeric Reader (Worksheet Data, Document Properties and basic Formatting) - Feature: (MBaker) Support for Extended Workbook Properties in Excel2007, Excel5 and OOCalc Readers; support for User-defined Workbook Properties in Excel2007 and OOCalc Readers