Fix to case-sensitivity in getCell() method when using a worksheet!cell reference

This commit is contained in:
MarkBaker 2015-05-04 23:34:36 +01:00
parent 372c7cbb69
commit 0cdda0dc42

View File

@ -1152,7 +1152,6 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
*/ */
public function getCell($pCoordinate = 'A1') public function getCell($pCoordinate = 'A1')
{ {
$pCoordinate = strtoupper($pCoordinate);
// Check cell collection // Check cell collection
if ($this->_cellCollection->isDataSet($pCoordinate)) { if ($this->_cellCollection->isDataSet($pCoordinate)) {
return $this->_cellCollection->getCacheData($pCoordinate); return $this->_cellCollection->getCacheData($pCoordinate);
@ -1161,7 +1160,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
// Worksheet reference? // Worksheet reference?
if (strpos($pCoordinate, '!') !== false) { if (strpos($pCoordinate, '!') !== false) {
$worksheetReference = PHPExcel_Worksheet::extractSheetTitle($pCoordinate, true); $worksheetReference = PHPExcel_Worksheet::extractSheetTitle($pCoordinate, true);
return $this->_parent->getSheetByName($worksheetReference[0])->getCell($worksheetReference[1]); return $this->_parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]));
} }
// Named range? // Named range?