Hello, I have a table containing links to download Google Spreadsheets as excel files (browser will try to download excel files just from opening these links). Currently, I have a button on each row to download a file of that row. This works, but I want to implement batch download with checkboxes and 1 button.
I have added a checkbox on each row, and I want to assign a button to run the following script to download files for all rows with checkbox selected.
const indices = Object.keys(table.changeSet);
for (const i of indices) {
const url = table.data[i].spreadsheetUrl;
utils.openUrl(url);
}
However, this script seems to end as soon as utils.openUrl
executes once, so I could not download more than 1 file.
Please advise. Thank you.