i need some help. I want to know what to do if i want to send an excel file generated by PHPexcel to the user downloading folder. The application works in a local network and it deals with billing.I need if a user click on the printing button defined in the application, the application should generate the invoice and downloading it to the downloading folder of his computer and if possible read automatically. Here the code i use but it doesn't work:
<?
php header('Pragma: public');
header('Expires: 0');
header('Content-Type: application/vnd.openxmlformats- officedocument.spreadsheetml.sheet');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream');
header('Content-Type: application/download');
header("Content-Disposition: attachment;filename=attendance.xlsx");
header('Content-Transfer-Encoding: binary');
……..
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
?>
Thx in advance!