title: header for excel file save as
body: <p>im able to output an excel file by php and it opens correctly in excel. No problems there. When the user clicsk save as in Excel it comes with first option .txt How can i set the header so first option will .xls with save as.
  Headers im using now : </p>
  
  <pre><code>$filename="jaar.xls";
  header("Content-Type: application/vnd.ms-excel");
  header("Content-Disposition: attachment; filename=$filename");
  header("Pragma: no-cache");
  header("Expires: 0");
  </code></pre>
  
  <p>Thanks in advance</p>