Reputation: 11
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save("test.xls");
PHPExcel save() not working in server ?
but working fine local machine?
anything i am missing?
Upvotes: 0
Views: 8304
Reputation: 346
Just Use ob_end_clean() function before $objWriter->save("test.xls");
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
ob_end_clean();
$objWriter->save("test.xls");
Upvotes: 0
Reputation: 371
Are the rights on the folder you are writing to sufficient enough to create or modify files? Use CHMOD
to change the rights.
When using error_reporting(E_ALL)
are there any errors or warnings?
Production servers often have display_errors set to off, turn it on by using ini_set("display_errors", "on")
to display them for your test file.
Upvotes: 1