Esempio n. 1
0
 /**
  *	Set AutoFilter Column Index
  *
  *	@param	string		$pColumn		Column (e.g. A)
  *	@throws	Exception
  *	@return PHPExcel_Worksheet_AutoFilter_Column
  */
 public function setColumnIndex($pColumn)
 {
     // Uppercase coordinate
     $pColumn = strtoupper($pColumn);
     if ($this->_parent !== NULL) {
         $this->_parent->_testColumnInRange($pColumn);
     }
     $this->_columnIndex = $pColumn;
     return $this;
 }
Esempio n. 2
0
 /**
  * Implement PHP __clone to create a deep clone, not just a shallow copy.
  */
 public function __clone()
 {
     foreach ($this as $key => $val) {
         if ($key == '_parent') {
             continue;
         }
         if (is_object($val) || is_array($val)) {
             if ($key == '_cellCollection') {
                 $newCollection = clone $this->_cellCollection;
                 $newCollection->copyCellCollection($this);
                 $this->_cellCollection = $newCollection;
             } elseif ($key == '_drawingCollection') {
                 $newCollection = clone $this->_drawingCollection;
                 $this->_drawingCollection = $newCollection;
             } elseif ($key == '_autoFilter' && $this->_autoFilter instanceof PHPExcel_Worksheet_AutoFilter) {
                 $newAutoFilter = clone $this->_autoFilter;
                 $this->_autoFilter = $newAutoFilter;
                 $this->_autoFilter->setParent($this);
             } else {
                 $this->{$key} = unserialize(serialize($val));
             }
         }
     }
 }
Esempio n. 3
0
 /**
  * Remove autofilter
  *
  * @return PHPExcel_Worksheet
  */
 public function removeAutoFilter()
 {
     $this->_autoFilter->setRange(NULL);
     return $this;
 }