I am trying to export an HTML table to Excel using javascript. This is the javascript code
First: Your header is malformed. It should be:
And second: It should be into your template, because it contains charset information for Excel.