You are here

public function PHPExcel::removeNamedRange in Loft Data Grids 7.2

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

Remove named range

Parameters

string $namedRange:

PHPExcel_Worksheet|null $pSheet Scope: use null for global scope.:

Return value

PHPExcel

File

vendor/phpoffice/phpexcel/Classes/PHPExcel.php, line 821

Class

PHPExcel
PHPExcel

Code

public function removeNamedRange($namedRange, PHPExcel_Worksheet $pSheet = null) {
  if ($pSheet === NULL) {
    if (isset($this->_namedRanges[$namedRange])) {
      unset($this->_namedRanges[$namedRange]);
    }
  }
  else {
    if (isset($this->_namedRanges[$pSheet
      ->getTitle() . '!' . $namedRange])) {
      unset($this->_namedRanges[$pSheet
        ->getTitle() . '!' . $namedRange]);
    }
  }
  return $this;
}