title: PHPExcel doesnt download xls
body: <p>Saw many similar questions but nothing helped. I use PHPExcel.
  I tried </p>
  
  <pre><code>$filename = "report.xls";
  header("Content-Type: application/vnd.ms-excel; charset=utf-8");
  header("Content-Disposition: attachment; filename=".$filename);
  header("Cache-Control: max-age=0");
  header("Content-Type: application/octet-stream");
  header("Content-Description: File Transfer");
  header("Content-Transfer-Encoding: Binary");
  $objWriter = PHPExcel_IOFactory::createWriter($pExcel, 'Excel5');
  $objWriter-&gt;save("php://output");
  </code></pre>
  
  <p>and this </p>
  
  <pre><code>$filename = "report.xlsx";
      header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
      header("Content-Disposition: attachment; filename=\"".$filename."\"");
      header("Cache-Control: max-age=0");
      header("Content-Type: application/octet-stream");
      header("Content-Description: File Transfer");
      header("Content-Transfer-Encoding: Binary");
      $objWriter = PHPExcel_IOFactory::createWriter($pExcel, 'Excel2007');
      $objWriter-&gt;save("php://output");
  </code></pre>
  
  <p>But it shows in browser "PKoCjKG�D�X�[Content_Types].xml��MN�0���"" like this and doesnt force to download.</p>