mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +03:00
INDIRECT and OFFSET call to get worksheet rather than cell collection
This commit is contained in:
parent
509bfd39e2
commit
d62615fbeb
@ -316,9 +316,9 @@ class PHPExcel_Calculation_LookupRef {
|
|||||||
if (strpos($cellAddress,'!') !== FALSE) {
|
if (strpos($cellAddress,'!') !== FALSE) {
|
||||||
list($sheetName, $cellAddress) = explode('!',$cellAddress);
|
list($sheetName, $cellAddress) = explode('!',$cellAddress);
|
||||||
$sheetName = trim($sheetName, "'");
|
$sheetName = trim($sheetName, "'");
|
||||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||||
} else {
|
} else {
|
||||||
$pSheet = $pCell->getParent();
|
$pSheet = $pCell->getWorksheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
return PHPExcel_Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, FALSE);
|
return PHPExcel_Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, FALSE);
|
||||||
@ -327,9 +327,9 @@ class PHPExcel_Calculation_LookupRef {
|
|||||||
if (strpos($cellAddress,'!') !== FALSE) {
|
if (strpos($cellAddress,'!') !== FALSE) {
|
||||||
list($sheetName,$cellAddress) = explode('!',$cellAddress);
|
list($sheetName,$cellAddress) = explode('!',$cellAddress);
|
||||||
$sheetName = trim($sheetName, "'");
|
$sheetName = trim($sheetName, "'");
|
||||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||||
} else {
|
} else {
|
||||||
$pSheet = $pCell->getParent();
|
$pSheet = $pCell->getWorksheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, FALSE);
|
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, FALSE);
|
||||||
@ -421,9 +421,9 @@ class PHPExcel_Calculation_LookupRef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($sheetName !== NULL) {
|
if ($sheetName !== NULL) {
|
||||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||||
} else {
|
} else {
|
||||||
$pSheet = $pCell->getParent();
|
$pSheet = $pCell->getWorksheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, False);
|
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, False);
|
||||||
|
@ -469,7 +469,7 @@ class PHPExcel_Cell
|
|||||||
/**
|
/**
|
||||||
* Get parent worksheet
|
* Get parent worksheet
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Worksheet
|
* @return PHPExcel_CachedObjectStorage_CacheBase
|
||||||
*/
|
*/
|
||||||
public function getParent() {
|
public function getParent() {
|
||||||
return $this->_parent;
|
return $this->_parent;
|
||||||
|
Loading…
Reference in New Issue
Block a user