I am building a feature to export data as CSV. I receive a CSV-Formatted string from my backend and I need to somehow be able to download this string directly from the page code. I am, however, having issues with this part. I couldn’t find a Velo function that is able to do this.
$item('#downloadBill').onClick(async function () {
const uri = await exportBillingAsCSV(itemData);
const encodedURI = encodeURI(uri);
// I must download the result here
});
I found this SO question and the answer would be exactly what I need. But I need the Velo equivalent of this answer:
https://stackoverflow. com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side