Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: data .xlsx corrupt because error output only 0kb

$
0
0
PHPExcel me no problems when exported but when I open in Ms.Excel2007, it can not be opened because it is corrupt or invalid format,
because when i want to download it output only 0kb

This sample code themselves:
// redirect output to client browser
            header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
            header('Content-Disposition: attachment;filename="backup_categories_products.xlsx"');
            header('Cache-Control: max-age=0');
            $objWriter = PHPExcel_IOFactory::createWriter($workbook,'Excel2007');           
            $objWriter->save('$filename');

            // Clear the spreadsheet caches
            $this->clearSpreadsheetCache();
            exit;
Please help me to resolve this problem
thanks

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>