title: Error XLS file generate and open using html,php
body: <p>I have generate xls file using html and php everthing is fine.
  But problem is that when tring to open file then following error display</p>
  
  <p><img src="https://i.stack.imgur.com/wXzej.png" alt="error display whene open"></p>
  
  <p>My code is here:</p>
  
  <pre><code>    $filename = "file.xls";
      header("Content-Type:   application/vnd.ms-excel; charset=utf-8");
      header("Content-type:   application/x-msexcel; charset=utf-8");
      header("Content-Disposition: attachment;filename=".$filename); //tell browser what's the file name
      header("Expires: 0");
      header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
      header("Cache-Control: max-age=0");
      echo '&lt;table&gt;
                 &lt;tr&gt;
                     &lt;th&gt;heading1&lt;/th&gt;
                     &lt;th&gt;heading2&lt;/th&gt;
                     &lt;th&gt;heading3&lt;/th&gt;
                 &lt;/tr&gt;
                 &lt;tr&gt;
                     &lt;td&gt;data1&lt;/td&gt;
                     &lt;td&gt;data2&lt;/td&gt;
                     &lt;td&gt;data3&lt;/td&gt;
                 &lt;/tr&gt;
             &lt;/table&gt;';
  </code></pre>