Cannot send Excel2007 to the browser

Topics: Developer Forum
May 19, 2010 at 1:46 PM

Running the 01-simple-download-xlsx.php in the Tests directory results in the standard FF File not found screen:


File not found

Firefox can't find the file at http://localhost:8888/acc-ext3.0/datastore/Tests/01simple-download-xlsx.php.

    *   Check the file name for capitalization or other typing errors.

    *   Check to see if the file was moved, renamed or deleted.

Running 01-simple-download.xls.php runs just fine and sends the spreadsheet to the browser.

I'm running both scripts unmodified.  When I diff the files:

< // Redirect output to a client’s web browser (Excel5)
< header('Content-Type: application/');
< header('Content-Disposition: attachment;filename="01simple.xls"');
> // Redirect output to a client’s web browser (Excel2007)
> header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
> header('Content-Disposition: attachment;filename="01simple.xlsx"');
< $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
> $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

Any pointers to get me to resolution??







May 19, 2010 at 2:09 PM


Found the answer -- I don't have php_zip enabled. 

From the Requirements Page:

*) php_zip is only needed by PHPExcel_Reader_Excel2007, PHPExcel_Writer_Excel2007, PHPExcel_Reader_OOCalc. In other words, if you need PHPExcel to handle .xlsx or .ods files you will need the zip extension, but otherwise not.