Does anyone know how to export a csv file via html?

@certified-code a console.log just before the download function is called shows that the contents were properly arranged ready for download, but a console.log inside the download function shows nothing. This might have to do with e blob conversions or compatibility, can you paste your code inside the download function?