5

I created a spreadsheet that I'd like to share with anyone with the URL.

The sheet contains several app script functions. These functions both change the content of the sheet and copy data to another (private) spreadsheet.

How do I get these functions executed even when the sheet is being opened by an anonymous user?

2 Answers 2

3

Scripts are run as the user who is viewing the spreadsheet, unless they are published as web applications, in which case you can choose to run the script as the spreadsheet owner.

So, in order to let your anonymous users modify the spreadsheet via a script, you need to give them edit rights, or publish your scripts as a web application, and instruct your users to visit the web application.

1
1

More specifics on Vidar's answer:

An anonymous user (accessed via link) can use the script attached to the sheet when they are given edit rights AND they sign-in with a google account, and give the permissions to run. So an anonymous user without a gmail account will not be able to use the scripts.

To allow anyone to use the script it has to be published as a web-application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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