Problem with Browser Download -> Windows

Topics: Developer Forum, Project Management Forum, User Forum
Nov 10, 2011 at 10:52 PM
Edited Nov 10, 2011 at 10:53 PM

I had a problem with downloading the xls file to IE from Windows2003

I saved the file to the server's hard drive first.
I did NOT use:
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

This worked for me just fine:


header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=MyExcelFile.xls');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($ExcelFilePath));