30 if (!defined(
'PHPEXCEL_ROOT')) {
34 define(
'PHPEXCEL_ROOT', dirname(__FILE__) .
'/../');
38 require_once PHPEXCEL_ROOT .
'PHPExcel.php';
41 require_once PHPEXCEL_ROOT .
'PHPExcel/Worksheet.php';
44 require_once PHPEXCEL_ROOT .
'PHPExcel/ReferenceHelper.php';
95 if (is_null($pName) || is_null($pWorksheet)|| is_null($pRange)) {
96 throw new Exception(
'Parameters can not be null.');
100 $this->_name = $pName;
101 $this->_worksheet = $pWorksheet;
102 $this->_range = $pRange;
103 $this->_localOnly = $pLocalOnly;
122 if (!is_null($value)) {
127 if (!is_null($this->_worksheet)) {
128 $this->_worksheet->getParent()->removeNamedRange($this->_name,$this->_worksheet);
130 $this->_name = $value;
132 if (!is_null($this->_worksheet)) {
133 $this->_worksheet->getParent()->addNamedRange($this);
159 if (!is_null($value)) {
160 $this->_worksheet = $value;
181 if (!is_null($value)) {
182 $this->_range = $value;
203 $this->_localOnly = $value;
215 return $pSheet->
getParent()->getNamedRange($pNamedRange, $pSheet);
222 $vars = get_object_vars($this);
223 foreach ($vars as
$key => $value) {
224 if (is_object($value)) {
225 $this->
$key = clone $value;
227 $this->
$key = $value;