title: How to use table2excel.js plugin to download HTML table into Excel
body: <p>I'm using the table2excel.js plugin to download an HTML table to Excel, in JavaScript. When I download the table, I get the message: "Excel cannot open the file 'Test.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file." When I manually change the name of the downloaded file to 'Test.xls', I'm able to open the file fine (with a small warning that the file format and extension don't match). </p>
  
  <p>Here is the link to table2excel.js: <a href="http://table2excel" rel="nofollow">https://github.com/rainabba/jquery-table2excel/blob/377b933ae6b04f4c1826acc24a2bb0a049933f8b/dist/jquery.table2excel.js</a></p>
  
  <p>Some of the things I've tried:<br>
  1. I changed  e.uri from "e.uri = data:application/vnd.ms-excel;base64," to "e.uri = "data:application/msexcel;base64,"<br>
  2. I changed<br>
  . . .   'return ( settings.filename ? settings.filename : "table2excel") + ".xlsx"'; to<br>
  . . . 'return ( settings.filename ? settings.filename : "table2excel") + ".xls"';<br>
  (when making this change, the file was saved as Test.xls.xlsx and still had the same problem opening the .xlsx file). </p>
  
  <p>How can I get the file to save as .xls rather than xlsx? Or is there a way to make this work while still saving the file as .xlsx (presumably by matching the format with the .xlsx extension)?</p>
  
  <p>Note: if it matters, the file Test.xlsx is "plain vanilla" with just text in a bunch of cells. There's no fancy formatting, characters, etc. The text is all Alphanumeric, with just a few special characters such as : ",.#'/@" </p>
  
  <p>Many thanks if any ideas! </p>