javascript - How can I access functions defined in Google Script Editor outside of it? -


if have function written in google spreadsheets script editor retrieves data in spreadsheet in json format, how can access function outside of script editor in own code? want access json , manipulate in own code. there way using spreadsheets api? format in specific way inside script editor can't use json-in-script provided. in call (http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myfunc) there's callback function myfunc. can use function defined in script editor replace myfunc?

following comment brings details on use case, there google-apps-script feature specially designed give access functions wrote within script : is called libraries , described in documentation.


edit, following 2cond comment:

calling gs function javascript (or other language) script not google script (gs) not possible if consider using function...

but

what can - depending on data function must handle - deploy script webapp running service , call service external app using equivalent of urlfetch (that's service doing in gs).

the service have url can add parameters , return result can use in local app.

of course workflow has few limitations , might become complex in many cases workable.

note url have use in "versioned" 1 ending .exec (not sure word correct mean published url corresponds version of script , not ".dev" 1 one can use test script in gs).

you'll find details in the documentation , on many other ressources, including so. url typically :

https://script.google.com/macros/s/akfycbyw-2wtmf7wsd__________azjimbmwm5yrxb8/exec?someparameter=somevalue&otherparam=otherval // etc... 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -