_cellCache[$pCoord] = $cell; return $cell; } // function addCacheData() /** * Get cell at a specific coordinate * * @param string $pCoord Coordinate of the cell * @throws Exception * @return PHPExcel_Cell Cell that was found, or null if not found */ public function getCacheData($pCoord) { // Check if the entry that has been requested actually exists if (!isset($this->_cellCache[$pCoord])) { // Return null if requested entry doesn't exist in cache return null; } // Return requested entry return $this->_cellCache[$pCoord]; } // function getCacheData() public function unsetWorksheetCells() { // Because cells are all stored as intact objects in memory, we need to detach each one from the parent foreach($this->_cellCache as $k => &$cell) { $cell->detach(); $this->_cellCache[$k] = null; } unset($cell); $this->_cellCache = array(); // detach ourself from the worksheet, so that it can then delete this object successfully $this->_parent = null; } // function unsetWorksheetCells() }