These are chat archives for PHPOffice/PHPExcel

Dec 2016
Dec 20 2016 10:14

Hi everyone,

I try to update an existing .xlxs file with PHPExcel. This file contains some graphs and data where each graph is store in a different sheet.

For this I load my excel file with the following code:

$objPHPExcel= new PHPExcel();
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objReader -> setIncludeCharts(TRUE);
$objPHPexcel = $objReader -> load('/my_existing_file.xlsx');

And when I save the file I use this snippet:

$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Excel2007');
$objWriter -> setIncludeCharts(TRUE);
$filename = '/test.xlsx';
$objWriter -> save($filename);

My file test.xlsx is generated but my graphs are missing. Do you know why ?

James Kinsman
Dec 20 2016 14:43
For some reason when I do some sheet copying and it works fine until i add more data, then i get ERR_EMPTY_RESPONSE from chrome
is there a way to stop PHPExcel from timing out? I tried set_time_limit(0) but that didn't work
Mark Baker
Dec 20 2016 14:45
Web servers also have timeout settings; but if it takes that long to run, don't run it from a web browser
James Kinsman
Dec 20 2016 14:48
if I do $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
$cacheSettings = array('memoryCacheSize' => '5000MB', 'cacheTime' => '1000');
    PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); the results are not the same for some reason
the results are not accurate
it times out after maybe 30 seconds