You are here

public function PHPExcel_Cell::setDataValidation in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php \PHPExcel_Cell::setDataValidation()

* Set Data validation rules * *

Parameters

PHPExcel_Cell_DataValidation $pDataValidation: * @return PHPExcel_Cell * @throws PHPExcel_Exception

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php, line 415

Class

PHPExcel_Cell
PHPExcel_Cell

Code

public function setDataValidation(PHPExcel_Cell_DataValidation $pDataValidation = NULL) {
  if (!isset($this->_parent)) {
    throw new PHPExcel_Exception('Cannot set data validation for cell that is not bound to a worksheet');
  }
  $this
    ->getWorksheet()
    ->setDataValidation($this
    ->getCoordinate(), $pDataValidation);
  return $this
    ->notifyCacheController();
}