mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 21:36:05 +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) {
|
||||
list($sheetName, $cellAddress) = explode('!',$cellAddress);
|
||||
$sheetName = trim($sheetName, "'");
|
||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
||||
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||
} else {
|
||||
$pSheet = $pCell->getParent();
|
||||
$pSheet = $pCell->getWorksheet();
|
||||
}
|
||||
|
||||
return PHPExcel_Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, FALSE);
|
||||
@ -327,9 +327,9 @@ class PHPExcel_Calculation_LookupRef {
|
||||
if (strpos($cellAddress,'!') !== FALSE) {
|
||||
list($sheetName,$cellAddress) = explode('!',$cellAddress);
|
||||
$sheetName = trim($sheetName, "'");
|
||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
||||
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||
} else {
|
||||
$pSheet = $pCell->getParent();
|
||||
$pSheet = $pCell->getWorksheet();
|
||||
}
|
||||
|
||||
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, FALSE);
|
||||
@ -421,9 +421,9 @@ class PHPExcel_Calculation_LookupRef {
|
||||
}
|
||||
|
||||
if ($sheetName !== NULL) {
|
||||
$pSheet = $pCell->getParent()->getParent()->getSheetByName($sheetName);
|
||||
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
|
||||
} else {
|
||||
$pSheet = $pCell->getParent();
|
||||
$pSheet = $pCell->getWorksheet();
|
||||
}
|
||||
|
||||
return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, False);
|
||||
|
@ -469,7 +469,7 @@ class PHPExcel_Cell
|
||||
/**
|
||||
* Get parent worksheet
|
||||
*
|
||||
* @return PHPExcel_Worksheet
|
||||
* @return PHPExcel_CachedObjectStorage_CacheBase
|
||||
*/
|
||||
public function getParent() {
|
||||
return $this->_parent;
|
||||
|
Loading…
Reference in New Issue
Block a user