I have a string in a Javascript file that I'd like to make an Excel spreadsheet out of. I use the following code:
var url = 'data:application/vnd.ms-excel,' + encodeURIComponent(excel);
location.href = url;
where "excel" here is the string in question.
This works perfectly well; I can download the file and then open it as an Excel spreadsheet, and it's formatted correctly and everything. But when I open the file, I have to choose which program I want to open it with. Is there a way to make it so that I can open the file with Excel automatically, without having to choose from a list of programs?