You are here

public function PHPExcel_CachedObjectStorage_SQLite3::copyCellCollection in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php \PHPExcel_CachedObjectStorage_SQLite3::copyCellCollection()

* Clone the cell collection * *

Parameters

PHPExcel_Worksheet $parent The new worksheet: * @return void

Overrides PHPExcel_CachedObjectStorage_CacheBase::copyCellCollection

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php, line 261

Class

PHPExcel_CachedObjectStorage_SQLite3
PHPExcel_CachedObjectStorage_SQLite3

Code

public function copyCellCollection(PHPExcel_Worksheet $parent) {
  $this->_currentCellIsDirty;
  $this
    ->_storeData();

  //	Get a new id for the new table name
  $tableName = str_replace('.', '_', $this
    ->_getUniqueID());
  if (!$this->_DBHandle
    ->exec('CREATE TABLE kvp_' . $tableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)
		                                       AS SELECT * FROM kvp_' . $this->_TableName)) {
    throw new PHPExcel_Exception($this->_DBHandle
      ->lastErrorMsg());
  }

  //	Copy the existing cell cache file
  $this->_TableName = $tableName;
}