1
votes

I've created my own google app script with one function. However, when I type "=" in sheet cell I can't see this function in suggestions. Also I don't see "Loading..." label which indicates external functions loading. Moreover, I cannot reach this function by name directly. What do I miss in using google app script function with google sheets? Is it bug or should I make some additional configurations?

Thanks for your help.

1
Could you please add the code from your app script? This is likely relevant.Matt Goodrich
It doesn't work with tutorial example as well. The case that sheets can't see script functions at all.Vlad Nan
When you navigate Tools -> Script editor... in Sheets does it open the script editor with your file open?Matt Goodrich
It opens blank project with "function myFunction() {}"Vlad Nan
I've just copy-pasted my code into newly created app script by default and it works. Not sure what was the cause with loading, probably some permissions issueVlad Nan

1 Answers

0
votes

It sounds like your script was not linked with the Sheet.

From the Google App Scripts doc,

A script is bound to a Google Sheets, Docs, or Forms file if it was created from that document rather than as a standalone script.

This means if you do not use Tools -> Script editor... in the Sheet for creating the script, it will not link to the Sheet.

From what I understand, a Standalone Script is treated as its own entity on Google Drive. This allows you to import the script if you were making a web application, for example, with the Drive REST API.

If you don't create a standalone script, then you will create the script in a project. I don't see an option to move scripts in the Script Projects Doc at the bottom under Managing files in a project.

Therefore, if you didn't make the script in the Sheets project, you will need to copy the contents into the project. There might also be an option for setting the project associated with the Sheet.