rainabba / jquery-table2excel

jQuery Plugin to export HTML tabled to Excel Spreadsheet Compatible Files
595 stars 663 forks source link

This plugin worked two weeks ago but isn't working now for IE 11 #46

Open Yangk402 opened 8 years ago

Yangk402 commented 8 years ago

This plugin can save table to html excel but can't open. When it opens, nothing appears. It works well for Chrome.

speed commented 8 years ago

@Yangk402

change code:

           if (typeof Blob !== "undefined") {
                    //use blobs if we can
                    fullTemplate = [fullTemplate];
                    //convert to array
                    var blob1 = new Blob(fullTemplate, { type: "text/html" });
                    window.navigator.msSaveBlob(blob1, getFileName(e.settings) );
             } 

to:

             if (typeof Blob !== "undefined") {
                    //use blobs if we can
                    fullTemplate=e.format(fullTemplate, e.ctx);
                    fullTemplate = [fullTemplate];
                    //convert to array
                    var blob1 = new Blob(fullTemplate, { type: "text/html" });
                    window.navigator.msSaveBlob(blob1, getFileName(e.settings) );
                }