I am trying to export some content as .csv file as shown in the below code.
function ExportToCSV(gridContent, file_name) {
if (detectIE()) { // Checks IE and Edge
var IEwindow = window.open();
IEwindow.document.write(gridContent);
IEwindow.document.close();
IEwindow.document.execCommand('SaveAs', true, file_name + ".csv");
} else {
..... for other browsers.........
}
}
I am having issue document.execCommand which is not functioning like it functions in internet explorer, i,e prompting the dialog window to store .csv file internet explorer
.
document.execCommand is failing in Edge, What i am missing ?