You are here

public function PHPExcel_Worksheet::mergeCellsByColumnAndRow in Loft Data Grids 7.2

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

Set merge on a cell range by using numeric cell coordinates

Parameters

int $pColumn1 Numeric column coordinate of the first cell:

int $pRow1 Numeric row coordinate of the first cell:

int $pColumn2 Numeric column coordinate of the last cell:

int $pRow2 Numeric row coordinate of the last cell:

Return value

PHPExcel_Worksheet

Throws

PHPExcel_Exception

File

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

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function mergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) {
  $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
  return $this
    ->mergeCells($cellRange);
}