From cdb94cfb1ef4f4bc93392f96689f11f9963c6e3f Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 30 May 2011 22:25:04 +0000 Subject: [PATCH] Minor performance tweak git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@74697 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Worksheet.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 0d9bdefb..a2e5ebe3 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -857,8 +857,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable */ public function setCellValue($pCoordinate = 'A1', $pValue = null, $returnCell = false) { - $cell = $this->getCell($pCoordinate); - $cell->setValue($pValue); + $cell = $this->getCell($pCoordinate)->setValue($pValue); if ($returnCell) { return $cell; @@ -877,8 +876,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable */ public function setCellValueByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $returnCell = false) { - $cell = $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - $cell->setValue($pValue); + $cell = $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow)->setValue($pValue); if ($returnCell) { return $cell;