Below is function which I am using to save csv file using execCommand
function opensave() {
var w = window.open('about:blank', '_blank');
w.document.write(csvText);
w.document.close();
var success = w.document.execCommand('SaveAs', true, 'test.csv');
w.close();
}
I am not able to see SaveAs dialog in IE 9
If I remove true
from
w.document.execCommand('SaveAs', true, 'test.csv');
SaveAs dialog opens, but I am seeing filename as untitled
in SaveAs dialog.
How do I get filename as test.csv
instead of untitled
in SaveAs
dialog ?
Thanks