Hi,
I have come across a perculiar cache issue when outputting to HTML/PDF and to some extent Excel (2003). Im using PHPExcel 1.7.8
I have a system that pulls stock items from a database. Each stock item has a stock category, so there can be many items in a category. I am outputting each category as its own xlsx and PDF file and im clearing the objects after each category using.
I tracked this down to the PHPExcel_Calculation cache so believe its method of deciding wether to use the cached values may be causing this?
I can get it to work by calling
Maybe the cache could be flushed in the disconnectWorksheets() method as standard?
Cheers
Stot
I have come across a perculiar cache issue when outputting to HTML/PDF and to some extent Excel (2003). Im using PHPExcel 1.7.8
I have a system that pulls stock items from a database. Each stock item has a stock category, so there can be many items in a category. I am outputting each category as its own xlsx and PDF file and im clearing the objects after each category using.
$objPHPExcel->disconnectWorksheets();
unset($objPHPExcel);
In general this is working great and the files export with the correct data, however if I have consecutive stock categories with the same number of stock items in them, all of the formula fields in the second xlsx/PDF output with the calculated data from the first xlsx/PDF.I tracked this down to the PHPExcel_Calculation cache so believe its method of deciding wether to use the cached values may be causing this?
I can get it to work by calling
PHPExcel_Calculation::flushInstance();
before saving the files. The files then all output with the correct calculated values in the first and second files.Maybe the cache could be flushed in the disconnectWorksheets() method as standard?
Cheers
Stot