You are here

public function PHPExcel_Worksheet::getStyleByColumnAndRow in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php \PHPExcel_Worksheet::getStyleByColumnAndRow()

Get style for cell by using numeric cell coordinates

Parameters

int $pColumn Numeric column coordinate of the cell:

int $pRow Numeric row coordinate of the cell:

int pColumn2 Numeric column coordinate of the range cell:

int pRow2 Numeric row coordinate of the range cell:

Return value

PHPExcel_Style

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php, line 1497

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2 = null, $pRow2 = null) {
  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);
}