Undefined method PHPExcel_CachedObjectStorage_Memory::getStyle()

Topics: Developer Forum
Mar 19, 2013 at 2:31 AM
Hi Mark,

I installed PHPExcel via composer for use within Zend Framework 2.1. The classes appear to autoload fine and I can load a file for reading.

However, when \PHPExcel_Shared_Date::isDateTime($cell) is called, it tosses the following error:
PHP Fatal error:  Call to undefined method PHPExcel_CachedObjectStorage_Memory::getStyle() in C:\project\vendor\phpoffice\phpexcel\Classes\PHPExcel\Shared\Date.php on line 256
I verified that the $cell in question is indeed of type PHPExcel_Cell and $cell->getParent() returns PHPExcel_CachedObjectStorage_Memory.

Am I missing something, or is this a bug?


Mar 20, 2013 at 2:50 PM
Yes, a bug... the develop branch on github contains a refactoring of the Worksheet/CellCollection/Cell relationships looking at reducing memory usage by eliminating duplicated data - I missed that reference to the refactored class relationships. Just pushed the correction to github.