How do I change the name of file while exporting data to Excel?
<div id="example" class="k-content">
<button type="button"id="btnExport">Export to csv!</button>
<div id="grid"></div>
</div>
<script>
$("#btnExport").click(function (e) {
var result = "data:application/vnd.ms-excel,";
window.open(result);
e.preventDefault();
});
</script>
When I click the export button I am getting as download.xls. Is it possible to set the file name as data.xls? Can any one explain me where I need to configure that?