简体   繁体   中英

Inherited Apps Script onOpen function not working on cloned Google Sheet

I am using the Drive API, authenticated via a service account, to copy a "master" Google Sheet that has an Apps Script attached. The Apps Script is simple and creates a custom menu in the Google Sheet. However, when the Google Sheet is copied from Drive and then accessed via the Google Sheets API, the attached apps script doesn't execute the onOpen function. I'm guessing there is some strange ownership/permissions issue that is preventing the onOpen from "activating" when it's copied with the service account and then given domain-wide "write" permissions.

On open events, simple and installable, are triggered only when a user opens a spreadsheet not by API actions.

Reference

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