mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-23 05:46:06 +03:00
Bugfix: Support for Excel functions whose return can be used as either a value or as a cell reference depending on its context within a formula
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@71420 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
2d362092ba
commit
70f773f0ca
@ -3001,14 +3001,31 @@ class PHPExcel_Calculation {
|
|||||||
// We must have two operands, error if we don't
|
// We must have two operands, error if we don't
|
||||||
if (is_null($operand2Data = $stack->pop())) return $this->_raiseFormulaError('Internal error - Operand value missing from stack');
|
if (is_null($operand2Data = $stack->pop())) return $this->_raiseFormulaError('Internal error - Operand value missing from stack');
|
||||||
if (is_null($operand1Data = $stack->pop())) return $this->_raiseFormulaError('Internal error - Operand value missing from stack');
|
if (is_null($operand1Data = $stack->pop())) return $this->_raiseFormulaError('Internal error - Operand value missing from stack');
|
||||||
// Log what we're doing
|
|
||||||
$operand1 = $operand1Data['value'];
|
$operand1 = $operand1Data['value'];
|
||||||
|
if ((is_null($operand1Data['reference'])) && (is_array($operand1))) {
|
||||||
|
$rowKey = array_shift(array_keys($operand1));
|
||||||
|
$colKey = array_shift(array_keys($operand1[$rowKey]));
|
||||||
|
if (ctype_upper($colKey)) {
|
||||||
|
$operand1Data['reference'] = $colKey.$rowKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
$operand2 = $operand2Data['value'];
|
$operand2 = $operand2Data['value'];
|
||||||
|
if ((is_null($operand2Data['reference'])) && (is_array($operand2))) {
|
||||||
|
$rowKey = array_shift(array_keys($operand2));
|
||||||
|
$colKey = array_shift(array_keys($operand2[$rowKey]));
|
||||||
|
if (ctype_upper($colKey)) {
|
||||||
|
$operand2Data['reference'] = $colKey.$rowKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log what we're doing
|
||||||
if ($token == ':') {
|
if ($token == ':') {
|
||||||
$this->_writeDebug('Evaluating Range '.$this->_showValue($operand1Data['reference']).$token.$this->_showValue($operand2Data['reference']));
|
$this->_writeDebug('Evaluating Range '.$this->_showValue($operand1Data['reference']).$token.$this->_showValue($operand2Data['reference']));
|
||||||
} else {
|
} else {
|
||||||
$this->_writeDebug('Evaluating '.$this->_showValue($operand1).' '.$token.' '.$this->_showValue($operand2));
|
$this->_writeDebug('Evaluating '.$this->_showValue($operand1).' '.$token.' '.$this->_showValue($operand2));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the operation in the appropriate manner
|
// Process the operation in the appropriate manner
|
||||||
switch ($token) {
|
switch ($token) {
|
||||||
// Comparison (Boolean) Operators
|
// Comparison (Boolean) Operators
|
||||||
|
@ -27,6 +27,7 @@ Fixed in SVN:
|
|||||||
- Bugfix: (MBaker) Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer
|
- Bugfix: (MBaker) Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer
|
||||||
- Bugfix: (MBaker) Work item 15518 - PCLZip library issue
|
- Bugfix: (MBaker) Work item 15518 - PCLZip library issue
|
||||||
- Bugfix: (MBaker) Work item 15537 - Excel2007 Reader canRead function bug
|
- Bugfix: (MBaker) Work item 15537 - Excel2007 Reader canRead function bug
|
||||||
|
- Bugfix: (MBaker) Support for Excel functions whose return can be used as either a value or as a cell reference depending on its context within a formula
|
||||||
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
|
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
|
||||||
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
|
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user