How to define global variable in Google Apps Script

后端 未结 6 2073
梦如初夏
梦如初夏 2020-11-30 03:23

I see most examples from Google is they use only functions in a single giant script.

e.g. https://developers.google.com/apps-script/quickstart/macros

But in

6条回答
  •  囚心锁ツ
    2020-11-30 04:12

    I use this: if you declare var x = 0; before the functions declarations, the variable works for all the code files, but the variable will be declare every time that you edit a cell in the spreadsheet

提交回复
热议问题