Phpexcel Why cannot generate xlsx file
Header (' Content-type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ');
Header (' content-disposition:attachment;filename= ' fee_detail.xlsx "');
Header (' cache-control:max-age=0 ');
$objWriter = Phpexcel_iofactory::createwriter ($objPHPExcel, ' Excel2007 ');
$objWriter->save (' php://output ');
Why the xlsx file could not be generated.
Header (' Content-type:application/vnd.ms-excel ');
Header (' content-disposition:attachment;filename= ' Fee_detail.xls "');
Header (' cache-control:max-age=0 ');
$objWriter = Phpexcel_iofactory::createwriter ($objPHPExcel, ' Excel5 ');
$objWriter->save (' php://output ');
You can generate an XLS file.
------Solution--------------------
Cannot generate XLSX, do you have an error message? or other informational messages
------Solution--------------------
Tested to generate. xlsx, you $objwriter->save (' Php://output '), followed by exit (); try it.