Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #269 from bolovincev/patch-1
Browse files Browse the repository at this point in the history
Update Worksheet.php getStyleByColumnAndRow()
  • Loading branch information
Mark Baker committed Jul 27, 2014
2 parents 698a56e + f505648 commit 983843d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Classes/PHPExcel/Worksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1488,11 +1488,20 @@ public function setConditionalStyles($pCoordinate = 'A1', $pValue)
*
* @param int $pColumn Numeric column coordinate of the cell
* @param int $pRow Numeric row coordinate of the cell
* @param int pColumn2 Numeric column coordinate of the range cell
* @param int pRow2 Numeric row coordinate of the range cell
* @return PHPExcel_Style
*/
public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1)
public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2=null, $pRow2=null)
{
return $this->getStyle(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);

if(!is_null($pColumn2) && !is_null($pRow2))
{
$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
return $this->getStyle($cellRange);
}

return $this->getStyle(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
}

/**
Expand Down

0 comments on commit 983843d

Please sign in to comment.