简体   繁体   中英

User no longer able to run macro in Google Sheets to refresh data connections

I have built a dashboard in Google Sheets that connects to Big Query. There are a series of filters that pass parameters to the connection scripts and a button that triggers a refresh of all connections once the user has made their filter selections. Today my user started experiencing an error when trying to refresh the connections. The error simply says "Script extract_refresh experienced an error Details" expanding the details simply repeats the same error message. I am still able to refresh the dashboard (when logged in with my account) without any issues which suggests it's an issue with the user's account rather than the file or the script. However, as far as I am aware nothing has changed with the macro, the dashboard file, nor the user access permissions. Any ideas?

A bit of further info:

  • User has an 'Editor' role in IAM for the project

  • I have an 'Owner' role

  • Big Query tables are fed by CSV files stored in Google Cloud Storage

  • The macro called by the button that is failing is pasted below:

     function extract_refresh() { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getRange('A2').activate(); SpreadsheetApp.enableAllDataSourcesExecution(); spreadsheet.refreshAllDataSources(); };

Problem solved - it turns out Google had signed the user out of their account. They were using the Chrome browser profile linked to their email address and the dashboard file loaded without issue so it appeared to be signed in. However in the top right of the screen there was a 'sign in' button instead of the 'share' button. The account was signed out and hence would not authorise them to run the script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM