3

Is it possible to run a script in google sheets from a specific user, regardless of the user that opens the sheet?

3

UPDATE: From a comment by the OP

So basically id want to the script to run as/from User A at all times. For example. User B, C, or D can all open the sheet and run the script, however i'd want it to run as User A all the time.

Only Google Apps Script Web Apps and installable triggers could be ran as the owner/creator, other scripts doesn't require permissions or if the require them run as the user that executed the script.


Short answer

Yes, it's possible.

Explanation

Bounded to spreadsheet scripts could be ran by any user that has edit access to the spreadsheet. If there aren't custom menus, to run a script, the user should

  1. Open the script editor, Tools > Script editor,
  2. If the script is not in the default file, open the corresponding file that holds the script,
  3. Select the script the the drop-down menu,
  4. Click the Run button

References

Extending Google Sheets

  • I'm not sure this answers the question, which is about running a script as a specific user (that is, with the rights that that user has). – user135384 Nov 28 '16 at 2:04
  • The question says "from a..." not "as a..." – Rubén Nov 28 '16 at 2:09
  • I don't see how you reconcile that position with "regardless of the user that opens the sheet" – user135384 Nov 28 '16 at 2:24
  • So basically id want to the script to run as/from User A at all times. For example. User B, C, or D can all open the sheet and run the script, however i'd want it to run as User A all the time. – David Meffe Nov 28 '16 at 2:51
  • I updated my answer. – Rubén Nov 28 '16 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.