/** * Clone the cell collection * * @param \PHPExcel\Worksheet $parent The new worksheet that we're copying to */ public function copyCellCollection(\PHPExcel\Worksheet $parent) { $this->currentCellIsDirty; $this->storeData(); $this->parent = $parent; if ($this->currentObject !== null && is_object($this->currentObject)) { $this->currentObject->attach($this); } }