Feature: (bolovincev) Work Item GH-269 - Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell

This commit is contained in:
MarkBaker 2014-07-27 13:12:44 +01:00
parent 983843d50c
commit ab693eafcd
2 changed files with 9 additions and 9 deletions

View File

@ -1405,7 +1405,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/** /**
* Get style for cell * Get style for cell
* *
* @param string $pCellCoordinate Cell coordinate to get style for * @param string $pCellCoordinate Cell coordinate (or range) to get style for
* @return PHPExcel_Style * @return PHPExcel_Style
* @throws PHPExcel_Exception * @throws PHPExcel_Exception
*/ */
@ -1494,10 +1494,9 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
*/ */
public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2 = null, $pRow2 = null) public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2 = null, $pRow2 = null)
{ {
if (!is_null($pColumn2) && !is_null($pRow2)) {
if(!is_null($pColumn2) && !is_null($pRow2)) $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow . ':' .
{ PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
return $this->getStyle($cellRange); return $this->getStyle($cellRange);
} }

View File

@ -33,6 +33,7 @@ Planned for v1.8.1
- Feature: (WiktrzGE) Work Item GH-404 - Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines - Feature: (WiktrzGE) Work Item GH-404 - Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines
- Feature: (frost-nzcr4) Work Item GH-403 - ODS read/write comments in the cell - Feature: (frost-nzcr4) Work Item GH-403 - ODS read/write comments in the cell
- Feature: (CQD) Work Item GH-389 - Additional Mac CJK codepage definitions - Feature: (CQD) Work Item GH-389 - Additional Mac CJK codepage definitions
- Feature: (bolovincev) Work Item GH-269 - Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell
- Feature: (MBaker) - New methods added for testing cell status within merge groups - Feature: (MBaker) - New methods added for testing cell status within merge groups