85 $this->_parent = $parent;
106 if ($pCoord === $this->_currentObjectID) {
110 return isset($this->_cellCache[$pCoord]);
121 public function moveCell($fromAddress, $toAddress) {
122 if ($fromAddress === $this->_currentObjectID) {
123 $this->_currentObjectID = $toAddress;
125 $this->_currentCellIsDirty =
true;
126 if (isset($this->_cellCache[$fromAddress])) {
127 $this->_cellCache[$toAddress] = &$this->_cellCache[$fromAddress];
128 unset($this->_cellCache[$fromAddress]);
154 if ($pCoord === $this->_currentObjectID && !is_null($this->_currentObject)) {
155 $this->_currentObject->detach();
156 $this->_currentObjectID = $this->_currentObject = null;
159 if (is_object($this->_cellCache[$pCoord])) {
160 $this->_cellCache[$pCoord]->detach();
161 unset($this->_cellCache[$pCoord]);
163 $this->_currentCellIsDirty =
false;
173 return array_keys($this->_cellCache);
186 $sortKeys[sprintf(
'%09d%3s',
$row,
$column)] = $coord;
190 return array_values($sortKeys);
203 $col =
array(
'A' =>
'1A');
206 sscanf($coord,
'%[A-Z]%d', $c,
$r);
208 $col[$c] = strlen($c).$c;
212 $highestRow = max(
$row);
213 $highestColumn = substr(max($col),1);
216 return array(
'row' => $highestRow,
217 'column' => $highestColumn
239 sscanf($this->_currentObjectID,
'%[A-Z]%d',
$column,
$row);
250 sscanf($this->_currentObjectID,
'%[A-Z]%d',
$column,
$row);
251 return (integer)
$row;
265 return $colRow[
'column'];
268 $columnList =
array(1);
270 sscanf($coord,
'%[A-Z]%d', $c,
$r);
290 return $colRow[
'row'];
295 sscanf($coord,
'%[A-Z]%d', $c,
$r);
302 return max($rowList);
312 if (function_exists(
'posix_getpid')) {
313 $baseUnique = posix_getpid();
315 $baseUnique = mt_rand();
317 return uniqid($baseUnique,
true);
330 $this->_parent = $parent;
331 if (($this->_currentObject !== NULL) && (is_object($this->_currentObject))) {
332 $this->_currentObject->attach($this);
344 sscanf($coord,
'%[A-Z]%d', $c,
$r);
359 sscanf($coord,
'%[A-Z]%d', $c,
$r);
removeRow($row)
Remove a row, deleting all cells in that row.
getCurrentColumn()
Return the column address of the currently active cell object.
isDataSet($pCoord)
Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
static cacheMethodIsAvailable()
Identify whether the caching method is currently available Some methods are dependent on the availabi...
getSortedCellList()
Sort the list of all cell addresses currently held in cache by row and column.
__construct(PHPExcel_Worksheet $parent)
Initialise this new cell collection.
deleteCacheData($pCoord)
Delete a cell in cache identified by coordinate address.
removeColumn($column)
Remove a column, deleting all cells in that column.
getCurrentRow()
Return the row address of the currently active cell object.
getParent()
Return the parent worksheet for this cell collection.
getCoordinate()
Get cell coordinate.
getCurrentAddress()
Return the cell address of the currently active cell object.
_getUniqueID()
Generate a unique ID for cache referencing.
getHighestRowAndColumn()
Get highest worksheet column and highest row that have cell records.
Create styles array
The data for the language used.
updateCacheData(PHPExcel_Cell $cell)
Add or Update a cell in cache.
static columnIndexFromString($pString='A')
Column index from string.
static stringFromColumnIndex($pColumnIndex=0)
String from columnindex.
getCellList()
Get a list of all cell addresses currently held in cache.
moveCell($fromAddress, $toAddress)
Move a cell object from one address to another.
getHighestColumn($row=null)
Get highest worksheet column.
getHighestRow($column=null)
Get highest worksheet row.
copyCellCollection(PHPExcel_Worksheet $parent)
Clone the cell collection.