Minor bugfixes
This commit is contained in:
parent
48c263d63b
commit
fb6ad92fd4
|
@ -3085,7 +3085,12 @@ class PHPExcel_Calculation {
|
|||
}
|
||||
$cellRef = PHPExcel_Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.PHPExcel_Cell::stringFromColumnIndex(max($oCol)).max($oRow);
|
||||
if ($pCellParent !== NULL) {
|
||||
$cellValue = $this->extractCellRange($cellRef, $pCellParent->getParent()->getSheetByName($sheet1), false);
|
||||
$referencedWorksheet = $pCellParent->getParent()->getSheetByName($sheet1);
|
||||
if ($referencedWorksheet) {
|
||||
$cellValue = $this->extractCellRange($cellRef, $referencedWorksheet, false);
|
||||
} else {
|
||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||
}
|
||||
} else {
|
||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||
}
|
||||
|
@ -3205,10 +3210,15 @@ class PHPExcel_Calculation {
|
|||
// echo '$cellRef='.$cellRef.' in worksheet '.$matches[2].'<br />';
|
||||
$this->_writeDebug('Evaluating Cell Range '.$cellRef.' in worksheet '.$matches[2]);
|
||||
if ($pCellParent !== NULL) {
|
||||
$referencedWorksheet = $pCellParent->getParent()->getSheetByName($matches[2]);
|
||||
if ($referencedWorksheet) {
|
||||
$cellValue = $this->extractCellRange($cellRef, $pCellParent->getParent()->getSheetByName($matches[2]), false);
|
||||
} else {
|
||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||
}
|
||||
} else {
|
||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||
}
|
||||
$this->_writeDebug('Evaluation Result for cells '.$cellRef.' in worksheet '.$matches[2].' is '.$this->_showTypeDetails($cellValue));
|
||||
// $cellRef = $matches[2].'!'.$cellRef;
|
||||
} else {
|
||||
|
@ -3238,11 +3248,12 @@ class PHPExcel_Calculation {
|
|||
// echo '$cellRef='.$cellRef.' in worksheet '.$matches[2].'<br />';
|
||||
$this->_writeDebug('Evaluating Cell '.$cellRef.' in worksheet '.$matches[2]);
|
||||
if ($pCellParent !== NULL) {
|
||||
if ($pCellParent->getParent()->getSheetByName($matches[2])->cellExists($cellRef)) {
|
||||
$cellValue = $this->extractCellRange($cellRef, $pCellParent->getParent()->getSheetByName($matches[2]), false);
|
||||
$referencedWorksheet = $pCellParent->getParent()->getSheetByName($matches[2]);
|
||||
if (($referencedWorksheet) && ($referencedWorksheet->cellExists($cellRef))) {
|
||||
$cellValue = $this->extractCellRange($cellRef, $referencedWorksheet, false);
|
||||
$pCell->attach($pCellParent);
|
||||
} else {
|
||||
$cellValue = null;
|
||||
$cellValue = NULL;
|
||||
}
|
||||
} else {
|
||||
return $this->_raiseFormulaError('Unable to access Cell Reference');
|
||||
|
@ -3631,7 +3642,7 @@ class PHPExcel_Calculation {
|
|||
if (!isset($aReferences[1])) {
|
||||
// Single cell in range
|
||||
list($currentCol,$currentRow) = sscanf($aReferences[0],'%[A-Z]%d');
|
||||
if ($pSheet->cellExists($aReferences[0])) {
|
||||
if ($pSheet && $pSheet->cellExists($aReferences[0])) {
|
||||
$returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog);
|
||||
} else {
|
||||
$returnValue[$currentRow][$currentCol] = null;
|
||||
|
@ -3642,7 +3653,7 @@ class PHPExcel_Calculation {
|
|||
// Extract range
|
||||
list($currentCol,$currentRow) = sscanf($reference,'%[A-Z]%d');
|
||||
|
||||
if ($pSheet->cellExists($reference)) {
|
||||
if ($pSheet && $pSheet->cellExists($reference)) {
|
||||
$returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog);
|
||||
} else {
|
||||
$returnValue[$currentRow][$currentCol] = null;
|
||||
|
|
|
@ -49,7 +49,7 @@ if (!file_exists("33chartcreate-bar.xlsx")) {
|
|||
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
|
||||
$objReader = PHPExcel_IOFactory::createReader("Excel2007");
|
||||
$objReader->setIncludeCharts(TRUE);
|
||||
$objPHPExcel = $objReader->load("33chartcreate.xlsx");
|
||||
$objPHPExcel = $objReader->load("33chartcreate-bar.xlsx");
|
||||
|
||||
|
||||
echo date('H:i:s') , " Update cell data values that are displayed in the chart" , EOL;
|
||||
|
|
|
@ -84,6 +84,7 @@ Fixed in develop branch:
|
|||
- Feature: (MBaker) Excel compatibility option added for writing CSV files
|
||||
While Excel 2010 can read CSV files with a simple UTF-8 BOM, Excel2007 and earlier require UTF-16LE encoded tab-separated files.
|
||||
The new setExcelCompatibility(TRUE) option for the CSV Writer will generate files with this formatting for easy import into Excel2007 and below.
|
||||
- Feature: (MBaker) Language implementations for Turkish (tr)
|
||||
- General: (alexgann) Add Currency detection to the Advanced Value Binder
|
||||
- General: (MBaker) Work item 18404 - setCellValueExplicitByColumnAndRow() do not return PHPExcel_Worksheet
|
||||
- General: (MBaker) Work item 18324 - Reader factory doesn't read anymore XLTX and XLT files
|
||||
|
|
Loading…
Reference in New Issue