Mar 16, 2011 at 9:16 PM
Edited Mar 16, 2011 at 9:17 PM
PHP v 5.2.14
PHPExcel v 1.7.6
Magento v 1.4
I'm trying to read a generated CSV file (not created with PHPExcel) and output it as an .xls file with PHPExcel. I've run into a number of problems with the autoloader because I am trying to utilize this under Magento 1.4, which has its own autoloader.
I can get PHPExcel to start the output process but for some reason it says it can't find the CSV file, but I can clearly see the CSV generated on the server.
Here is a snippet of the ouput code with the path:
$objWriter2007 = PHPExcel_IOFactory::createWriter(Mage::getBaseDir('export').'/'.$file, 'Excel2007');
This results in an error "Firefox can't find the file at..." and then some path that is NOT what it should be for the file.
Anybody have any ideas or used this library from within Magento?