i have following function by using this i am exporting my html to Csv file. few days/months ago it was working fine in google chrome browser (still its working fine
My solution is for excel file export:
var xslData = new Blob([$('#printableSearchResults').html()], { type: 'text/vnd.ms-excel' });
var uri = URL.createObjectURL(xslData);
after doing some more research i got the solution for this.
i have changed this
var csvData ='data:application/csv;charset=utf-8,' + encodeURIComponent(dumpd);
$(this)
.attr({
'download': filename,
'href': csvData,
'target': '_blank'
});
To
var csvData = new Blob([dumpd], { type: 'text/csv' }); //new way
var csvUrl = URL.createObjectURL(csvData);
$(this)
.attr({
'download': filename,
'href': csvUrl
});
and it worked fine. it seems chrome has changed something in new version.
Hope it may help others.