title: PHPExcel File format or extension is not valid
body: <p>I'm using phpexcel for export my query in excel file; however after I created file(which is xslx format), I can not open my file in excel. It gives "the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the file format of the file" error. When I open the file in texteditor(mine is npp) I see my php file's css codes and some part of my html codes. My code is like that;</p>
  
  <pre class="lang-php prettyprint-override"><code>if( ! empty($_POST['export'])){
    $query = "SELECT * FROM asd ORDER BY asdf LIMIT 10";
    $headings = array('Timestamp', 'h1','h2');
        require 'Classes/PHPExcel.php';
  
    $objPHPExcel = new PHPExcel();
    $objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('List of Users');
  
    $rowNumber = 1;
    $col = 'A';
    foreach($headings as $heading) {
      $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue($col.$rowNumber,$heading);
      $col++;
    }
  
    $rowNumber = 2;
    while ($row = mysql_fetch_row($result)) {
      $col = 'A';
      foreach($row as $cell) {
          $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue($col.$rowNumber,$cell); 
          $col++;
      }
      $rowNumber++;
    }
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;freezePane('A2');
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
  
  header('Content-Type: application/vnd.ms-excel');
  header('Content-Disposition: attachment;filename="userList.xlsx"');
  header("Content-Transfer-Encoding: binary ");
  //ob_end_clean();
  //header('Cache-Control: max-age=0');
  
  $objWriter-&gt;save('php://output');
  exit();
  }
  </code></pre>
  
  <p>I'm stucked please help. Thank you.</p>