title: Force download excel file using PHPExcel
body: <p>I'm using following headers to output excel sheet generated through PHPExcel:</p>
  
  <pre><code>// Redirect output to a client’s web browser (Excel2007)
  header('Content-Type: application/vnd.ms-excel');
  header('Content-Disposition: attachment;filename="01simple.xlsx"');
  header('Cache-Control: max-age=0');
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  $objWriter-&gt;save('php://output'); 
  </code></pre>
  
  <p>Instead gibberish text is sent to the browser:</p>
  
  <pre><code>PK������&amp;DG�D�X��������[Content_Types].xml��MN�0���"�%nY ��vAa  �(0����ؖg�w{&amp;i�@�nbE�{��y��d۸l
      m�����X�(���)���F��;@1_�����c)j�x/%��E��y�
  </code></pre>
  
  <p>Could anyone help me with proper headers to force download an excel file? Many thanks.</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <pre><code>header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="01simple.xlsx"');
  header('Cache-Control: max-age=0');
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  $objWriter-&gt;save('php://output'); 
  </code></pre>
  
  <p>Still not working</p>