title: Exporting html table to excel from Javascript in Internet Explorer
body: <p>I have the following code from button click event in client side. It is opening the excel in Chrome. However, in IE, it is just appending to the URL and it is not working as desired.</p>
  
  <pre><code>function generateexcel() {
  
      var table = document.getElementById("tsttable");
  
      var c = table.innerHTML;
  
      var html = c.trim()
  
      //add more symbols if needed...
      while (html.indexOf('á') != -1) html = html.replace('á', '&amp;aacute;');
      while (html.indexOf('é') != -1) html = html.replace('é', '&amp;eacute;');
      while (html.indexOf('í') != -1) html = html.replace('í', '&amp;iacute;');
      while (html.indexOf('ó') != -1) html = html.replace('ó', '&amp;oacute;');
      while (html.indexOf('ú') != -1) html = html.replace('ú', '&amp;uacute;');
      while (html.indexOf('º') != -1) html = html.replace('º', '&amp;ordm;');
  
      window.open('data:application/vnd.ms-excel,' + escape(html));
  }
  </code></pre>