Please how do I get my csv file to download

@certified-code I send the data from my site page to the html to convert and download as csv, this is the html code, the conversion takes place as you can see I have console.logs at different points to capture progress or errors. The final part that sends “SUCCESSFUL” back to my website actually does which means everything worked but I do not receive the download after the process.

No error message,
Tested in the live