Javascript/ jQuery : Exporting data in CSV not working in IE

后端 未结 6 1460
太阳男子
太阳男子 2020-12-25 13:43

I need to Export Data displayed in a Table to CSV Format. I have tried lot many things but couldn\'t get it working for IE 9 and above.

I have created a dummy fiddle

6条回答
  •  遥遥无期
    2020-12-25 14:14

    After using Javascript it will solve your problem.

    Use this for IE,

    var IEwindow = window.open();
    IEwindow.document.write('sep=,\r\n' + CSV);
    IEwindow.document.close();
    IEwindow.document.execCommand('SaveAs', true, fileName + ".csv");
    IEwindow.close();
    

    For more information i have written tutorial on that, see - Download JSON data in CSV format Cross Browser Support

    Hope this will be helpful for you.

提交回复
热议问题