You are here

public function PHPExcel_Worksheet::protectCellsByColumnAndRow 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::protectCellsByColumnAndRow()

Set protection 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:

string $pPassword Password to unlock the protection:

boolean $pAlreadyHashed If the password has already been hashed, set this to true:

Return value

PHPExcel_Worksheet

Throws

PHPExcel_Exception

File

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

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function protectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false) {
  $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
  return $this
    ->protectCells($cellRange, $pPassword, $pAlreadyHashed);
}