title: Phpexcel can't write to xls 97-2003 format
body: <pre><code>                &lt;?
  require_once '../Classes/PHPExcel.php';
  require_once '../Classes/PHPExcel/IOFactory.php';
  require_once '../Classes/PHPExcel/Writer/Excel2007.php';
  
   $objPHPExcel = PHPExcel_IOFactory::load("../../ruw/myfile.xlsx");
   $objPHPExcel-&gt;setActiveSheetIndex(0);
   $row = $objPHPExcel-&gt;getActiveSheet()-&gt;getHighestRow()+1;
  
  
   $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue("A5",$m5);
   $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue("B5",$m1);
  
      $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('A1:L300')-&gt;
      getProtection()-&gt;setHidden(PHPExcel_Style_Protection::OTECTION_PROTECTED);
  
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setSheet(true);
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setSort(true);
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setInsertRows(true);
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setInsertColumns(true);
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setFormatCells(true);
    $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setFormatColumns(true);
     $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setDeleteColumns(true);
     $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setDeleteRows(true);
     $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setSelectLockedCells(true);
     $objPHPExcel-&gt;getActiveSheet()-&gt;getProtection()-&gt;setPassword($passy);
  
  
      $objDrawing-&gt;setWorksheet($objPHPExcel-&gt;getActiveSheet());
      $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
  
     $d =$m1;
     $d = preg_replace('/[^a-zA-Z0-9%$#@*&amp;^-_()]/','',$m1);
     $fil = "../../ruw/".$d.".xlsx";
     $objWriter-&gt;save($fil);
  
      echo "&lt;label style='font:Verdana, Geneva, sans-serif; font-size:20px; color:#CE0000'&gt;
      File download start automatically if not click here to &lt;/label&gt;&amp;nbsp;";
      echo "&lt;a  style='font:Verdana, Geneva, sans-serif; color:#000; font-weight:bold;'   href='$fil'&gt;Download&lt;/a&gt;&amp;nbsp;";
     echo "&lt;script type='text/javascript'&gt;" ;
      echo "reply_click(".$_SESSION['mid'].",'$fil')";
      echo "&lt;/script&gt;";
      ?&gt;
  </code></pre>
  
  <p>This code is working fine to write on ".xlsx" but not working to write no ".xls"  </p>
  
  <p>if i try to write and open .xls i am getting different format,unreadable content and xml parse arror </p>
  
  <p>i want to write to .xls 97-2003 and save it as .xls 97-2003 format</p>
  
  <p>Thanks in advance</p>