(JavaScript/jQuery): Create dynamically anchor tag and simulate click on that anchor tag automatically.
================================= var link = document.createElement('a'); link.href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' + response.data; link.download = "report" + GetCurrentDate() + ".xlsx"; //Firefox requires the link to be in the body document.body.appendChild(link); //simulate click link.click(); //remove the link when done document.body.removeChild(link); ================================= var GetCurrentDate = function () { var today = new Date(); ...