In my PHP application I use phpexcel to dynamically create MS Excel file.
On some of my PC-s, I have a problem because Windows overwrite extenstion of generated XLS file, and it changes it to XLSX.
Can you help me how can I "force", that file extenstion be XLS and not XLSX?
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="'. date('Y-m-d') .'.xls"');
header('Cache-Control: max-age=0');
$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);
$objWriter->save('php://output');
I guess that reasion is that some of the browsers have setup that "save file without any questions", and due to that windows change it's extenstion.
so, how can I avoid it, and to save file always and only with XLS extension.