I'm allways lost when I have to download a google sheet with script.
this is a script to generate a CSV.
function s2csv() {
var s, d, sname, vals, f;
d=";";//<<<set the desired delimiter
s=SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sname=s.getName();
vals=s.getDataRange().getValues().map(function(x) {return x.join(d);}).join('\n');
f=DriveApp.createFile(sname+".csv", vals, MimeType.CSV);
}
I can "download" it on my Drive, but how should I finish my script to download this csv file onto my computer instead of my "google Drive"?