So I did me some grepping, and on line 2164 of Calculation.php, there is the line:
I've gotta say, I've been walking through your code and it's beautiful.
I'm sure you already know this, but I tried to trace the issue through the code as far as I could, and essentially, _calculateFormulaValue is sending the value of $pCell to _parseFormula with getValue() which changes ='1'!A1 to =1!A1 (actually, it's 1!A1 by this point, but again, you know this) which then flows down to line 2905 of Calculation.php and hits } elseif (is_numeric($val)) { and it thinks it's a number instead of a sheet name, and then gets the next character which is a ! and it thinks it's a variable or something.
$result = self::_unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell));
If referencing the cell on a different sheet by using the '1'!A1 format WOULD have worked, getting the formula's text with getValue() removed the 's, as shown above..... which just made me wonder if magic_quotes might have something to do with it. I'm burnt out for the night, so I'll mess with that tomorrow, just to rule it out.I've gotta say, I've been walking through your code and it's beautiful.
I'm sure you already know this, but I tried to trace the issue through the code as far as I could, and essentially, _calculateFormulaValue is sending the value of $pCell to _parseFormula with getValue() which changes ='1'!A1 to =1!A1 (actually, it's 1!A1 by this point, but again, you know this) which then flows down to line 2905 of Calculation.php and hits } elseif (is_numeric($val)) { and it thinks it's a number instead of a sheet name, and then gets the next character which is a ! and it thinks it's a variable or something.