You are here

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

Set data validation

Parameters

string $pCellCoordinate Cell coordinate to insert data validation:

PHPExcel_Cell_DataValidation $pDataValidation:

Return value

PHPExcel_Worksheet

File

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

Class

PHPExcel_Worksheet
PHPExcel_Worksheet

Code

public function setDataValidation($pCellCoordinate = 'A1', PHPExcel_Cell_DataValidation $pDataValidation = null) {
  if ($pDataValidation === null) {
    unset($this->_dataValidationCollection[$pCellCoordinate]);
  }
  else {
    $this->_dataValidationCollection[$pCellCoordinate] = $pDataValidation;
  }
  return $this;
}