PHPExcel Google App Engine not saving file for Exc

2019-08-29 05:42发布

when i try to create a Excel2007 file in App Engine Development i am getting error message like below

Fatal error: Uncaught exception 'PHPExcel_Writer_Exception' with message 'Could not close zip file vfs://root/temp//phpxltmp55e656770cf804.01144164.' in C:\inetpub\wwwroot\GAE\teja-school\Excell\Classes\PHPExcel\Writer\Excel2007.php:399 Stack trace: #0 C:\inetpub\wwwroot\GAE\teja-school\index.php(31): PHPExcel_Writer_Excel2007->save('php://output') #1 C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php(147): require('C:\inetpub\wwwr...') #2 {main} thrown in C:\inetpub\wwwroot\GAE\teja-school\Excell\Classes\PHPExcel\Writer\Excel2007.php on line 399

my code is

$objPHPExcel = new PHPExcel();

PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT;
$objPHPExcel->setActiveSheetIndex(0);
$excell= $objPHPExcel->getActiveSheet();



$excell->setCellValue('A1', 4);




header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="my_file.xlsx"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;

after i deployed it to Appengine production server it is showing that 'web page is not available'

any possible way to achieve it.

0条回答
登录 后发表回答