I have encountered weird behavior of PHPExcel lib (I have never used it before). I have code like this:
$inputFileName = 'excel.ods';
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
I dont know what exactly toArray method does because I CAN’T FIND ANY DOCUMENTATION OF THIS THING. I think that the problem occurs when an excel file has some blank cells – they are not copied but next cell is wriiten in their places or something. Could someone provide me documentation to function toArray? (i think that something is wrong with that parameters).
Thank you in advance 🙂
PS: it is code from example
toArray() takes the data from each cell in the worksheet and puts it in a PHP array
There is a bug in the current 1.7.7 release that can misalign cells read from ods files when there are blank cells in the worksheet. This bug has been fixed in the latest code on github.