How can I call my standalone script in my table?

I created stand-alone Script applications from Google Drive, but when I try to access it from a Google spreadsheet, I see no way to access the Script (although when I created the script, I created it as a script table).

In the spreadsheet, the menu item "Tools β†’ Script manager ..." does not display my script, as well as the editor "Tools β†’ Script ...". The latter has a section for "recent projects", but it does not list my newly created script or the project associated with it.

If I create a new Script from inside a spreadsheet (i.e. Tools β†’ Script editor ...) and cut and paste the code from a stand-alone script, it works fine. However, this can only be used in one spreadsheet - to use it from another, I need to cut / paste / go through auth again and again.

Is there a way to do this without publishing the Script in the gallery, which I assume makes it publicly available (I have no problem publishing it, but it seems like there should be a better way)? Script is here - it is available for reading all over the world. It adds a menu to the google spreadsheet, which allows you to run a query in BigQuery and upload the results to your spreadsheet.

+4
source share
3 answers

I worked with Jordan following the instructions here:

https://developers.google.com/apps-script/guide_libraries

  • Firstly, he had to share a stand-alone script with me, so I got access to it (perhaps by installing a script, how public reading will work).
  • Then he told me his project key.
  • I took his project key and inserted it into "Find Library" in the "Manage Libraries" menu.
  • For this, Jordan had to export a β€œversion” of his library, so third parties can rely on a stable code and update their rhythm.
  • Jordan script onOpen(), onOpen(), script onOpen(). .

:

   function onOpen() {
     GivenLibraryIdentifier.onOpen();
   }
+2

, , , ... script, , , .

, script, , script, onOpen, , , t ( /, script).

script / , , script, , ( ) , Google , script ( doc ).

2 , webapps, . doGet, . , .

: getActiveSpreadsheet() , ( ) script script, .

script, ( ), , , " " " "...

Webapp , , , , .

, () , , ; -)

+2

. (, onOpen) script , , .

, script, WITHIN script! script. Logger.log() script, .

, script onOpen(), , , Sheets () script .

(, script .)

+1
source

All Articles