Global variables in Google Script (spreadsheet)

后端 未结 3 761
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 08:17

I\'ve been trying to get some functions in a Google apps script (inside a spreadsheet) to modify a global variable, but I can\'t seem to figure it out.

Basically I

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 09:14

    PropertiesService -> Properties

    Currently (2015), I think the way to go is using the class PropertiesService and the return type Properties.

    About the global scope

    As I understand it, each new invokation of a script function (time triggers, user clicked a menu item, pressed a button, etc), will lead to a new full parse of the script without memory of earlier executions unless they were persisted somehow (in a spreadsheet range or using Properties for example).

提交回复
热议问题