How to define global variable in Google Apps Script

You might be better off using the Properties Service as you can use these as a kind of persistent global variable. click ‘file > project properties > project properties’ to set a key value, or you can use PropertiesService.getScriptProperties().setProperty(‘mykey’, ‘myvalue’); The data can be retrieved with var myvalue = PropertiesService.getScriptProperties().getProperty(‘mykey’);

How to number the headings in a Google Docs/Drive document?

If you want something more easy, there is a Google Add-On called “Table of Contents” that will allow you to number your headings. To install this add-on: Click on the Add-Ons > Get Add-Ons. Click on the “Table of Contents” icon or search for this addon to install it Then your Table of Contents should … Read more

Get first item from Split()

You can use the index function to select which value to return. So to retrieve the second value from your example you could use: =index(SPLIT(“1.23/1.15”, “https://stackoverflow.com/”), 0, 2) The last argument says which column you wish to retrieve – 1 would retrieve the first value. Alternatively you could use left / right and find to … Read more

wget/curl large file from google drive

June 2022 You can use gdown. Consider also visiting that page for full instructions; this is just a summary and the source repo may have more up-to-date instructions. Instructions Install it with the following command: pip install gdown After that, you can download any file from Google Drive by running one of these commands: gdown … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)