Google-sheets – How to Run Google Spreadsheet script from specific user

google sheetsgoogle-apps-script

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

Best Answer

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