PhpSpreadsheet/samples/06_Largescale_with_cellcach...

16 lines
505 B
PHP

<?php
require __DIR__ . '/Header.php';
$cacheMethod = \PhpSpreadsheet\CachedObjectStorageFactory::CACHE_IN_MEMORY_GZIP;
if (\PhpSpreadsheet\Settings::setCacheStorageMethod($cacheMethod)) {
$helper->log('Enable Cell Caching using ' . $cacheMethod . ' method');
} else {
$helper->log('ERROR: Unable to set Cell Caching using ' . $cacheMethod . ' method, reverting to memory');
}
$spreadsheet = require __DIR__ . '/templates/largeSpreadsheet.php';
// Save
$helper->write($spreadsheet, __FILE__);