diff --git a/Classes/PHPExcel/Calculation/LookupRef.php b/Classes/PHPExcel/Calculation/LookupRef.php index c3363f1..96c7da2 100644 --- a/Classes/PHPExcel/Calculation/LookupRef.php +++ b/Classes/PHPExcel/Calculation/LookupRef.php @@ -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); diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 6664e64..2cafff3 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -469,7 +469,7 @@ class PHPExcel_Cell /** * Get parent worksheet * - * @return PHPExcel_Worksheet + * @return PHPExcel_CachedObjectStorage_CacheBase */ public function getParent() { return $this->_parent;