title: PHPExcel File format or extension is not valid 2
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. If i try to open with OpenOffice Calc it opens correctly. But excelviewer does not open. </p>
  
  <pre><code>    &lt;?php
  require 'Classes/PHPExcel.php';
  require 'Classes/PHPExcel/Writer/Excel2007.php';
  require "database.php";
  require "C_TahsilatGetir.php";
  
  $obj = new TahsilatGetir;
  $bitis = $obj-&gt;getExcelLastDate();
  $baslangic = date("d/m/Y");
  $tahsilatlar = $obj-&gt;tahsilatGetirTarih($bitis["son_tarihi"], $baslangic); 
  
  // Create new PHPExcel object
  echo date('H:i:s') . " Create new PHPExcel object\n";
  $objPHPExcel = new PHPExcel();
  
  // Set properties
  echo date('H:i:s') . " Set properties\n";
  $objPHPExcel-&gt;getProperties()-&gt;setCreator("Maarten Balliauw");
  $objPHPExcel-&gt;getProperties()-&gt;setLastModifiedBy("Maarten Balliauw");
  $objPHPExcel-&gt;getProperties()-&gt;setTitle("Office 2007 XLSX Test Document");
  $objPHPExcel-&gt;getProperties()-&gt;setSubject("Office 2007 XLSX Test Document");
  $objPHPExcel-&gt;getProperties()-&gt;setDescription("Test document for Office 2007 XLSX, generated using PHP classes.");
  
  // Add some data
  echo date('H:i:s') . " Add some data\n";
  $objPHPExcel-&gt;setActiveSheetIndex(0);
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('A1', 'SIRA');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('B1', 'MÜŞTERİ NO');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('C1', 'ÜNVAN');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('D1', 'BÖLGE');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('E1', 'GELEN TUTAR');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('F1', 'TARİH');
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('G1', 'AÇIKLAMA');
  $k = 2;
  for ($i = 0; $i &lt; count($tahsilatlar); $i++) {
      if ($tahsilatlar[$i]["tahsilat_turu"] == "Kredi Kartı") {
          $cell1 = "A".$k;
          $cell2 = "B".$k;
          $cell3 = "C".$k;
          $cell4 = "D".$k;
          $cell5 = "E".$k;
          $cell6 = "F".$k;
          $cell7 = "G".$k;
          $sira = $k - 1;
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell1, $sira);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell2, $tahsilatlar[$i]["musteri_no"]);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell3, $tahsilatlar[$i]["musteri_unvani"]);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell4, $tahsilatlar[$i]["bolge"]);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell5, $tahsilatlar[$i]["tutar"]);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell6, $tahsilatlar[$i]["tahsilat_tarihi"]);
          $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue($cell7, $tahsilatlar[$i]["banka"]);
          $k++;
      }
  }
  
  // Rename sheet
  echo date('H:i:s') . " Rename sheet\n";
  $objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('Simple');
  
  
  // Save Excel 2007 file
  echo date('H:i:s') . " Write to Excel2007 format\n";
  $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
  header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="KREDIKARTI.xlsx"');
  $objWriter-&gt;save('php://output');
  
  // Echo done
  echo date('H:i:s') . " Done writing file.\r\n";
  ?&gt;
  </code></pre>