Prevent stack overflow problem when formula in a cell contains a named range without a worksheet reference... this doesn't fix the formula, but does avoid the exception and allows the workbook to be written with the problematic cell as a blank

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@86488 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-02-14 23:27:50 +00:00
parent c50003e6e1
commit 337af28233

View File

@ -1055,6 +1055,7 @@ class PHPExcel_Writer_Excel5_Parser
while ($i < $formula_length) {
$token .= $this->_formula{$i};
if ($i < ($formula_length - 1)) {
$this->_lookahead = $this->_formula{$i+1};
} else {
@ -1183,6 +1184,11 @@ class PHPExcel_Writer_Excel5_Parser
{
return $token;
}
// It's an argument of some description (e.g. a named range),
// precise nature yet to be determined
elseif(substr($token,-1) == ')') {
return $token;
}
return '';
}
}