Im exporting a html table to excel and its works fine, but I want the user to be able to choose name for the file they are downloading.
Here is how I export it:
 function exportToExcel() {
 window.open('data:application/vnd.ms-excel,' +
 encodeURIComponent($('#exportToExcelDiv').html()));
 e.preventDefault();
 }
And here is the link that uses that function:
<a href="#" title="Save"><img src="../../Images/glyphicons_446_floppy_save.png"
 alt="save" onclick="exportToExcel()"></a>
Is there a way to do this? Its okay not to use javascript. (I'm doing a webapplication in MVC4).
 
     
     
    