PHPExcel_IOFactory::createWriter causes wrong behaviour
PHP Snippet 1:
07:31:12 Create new PHPExcel object
07:31:12 Set properties
07:31:12 Add some data
07:31:12 Rename sheet
07:31:12 Write to Excel2007 format
PHP Snippet 2:
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="workbook1.xlsx"');
header('Cache-Control: max-age=0');
ob_end_clean();
$objWriter->save('php://output');
exit;