I read lot of sample to generate csv file from data and push it to download to export it.
let csvContent = \'\';
$.each(msg.d.LstObj[0], fun
Here is the block I use to satisfy all browsers, IE 11 included and it works great for me:
if (window.navigator.msSaveBlob) {
//Internet Explorer
window.navigator.msSaveBlob(new Blob([result]), csvFileName);
} else if (window.webkitURL != null) {
//Google Chrome and Mozilla Firefox
var a = document.createElement("a");
result = encodeURIComponent(result);
a.href = "data:application/csv;charset=UTF-8," + result;
a.download = csvFileName;
a.click();
} else if (navigator.appName === "Microsoft Internet Explorer") {
//Internet Explorer 8 and 9
var oWin = window.open();
oWin.document.write("sep=,\r\n" + result);
oWin.document.close();
oWin.document.execCommand("SaveAs", true, csvFileName);
oWin.close();
} else {
//Everything Else
window.open(result);
}