AppsScriptPulse

Using Google Apps Script to disable custom functions assigned to Google Sheets buttons/images to prevent simultaneous execution · tanaike

This is a sample script for disabling the buttons put on Google Spreadsheet using Google Apps Script. When a script is run by clicking a button on Google Spreadsheet, there is the case that you don’t want to make users run the script in duplicate.

Nice little Google Apps Script snippet that prevents a function assigned to an image or drawing in Google Sheets from being run simultaneously. The clever bit is the code uses Google Apps Script to modify the function assigned to the button/image when it is running.

Source: Disabling Buttons Put on Google Spreadsheet using Google Apps Script · tanaike

Taking Advantage of Google Apps Script (Tanaike’s list)

Kanshi Tanaike is a prolific Google Apps Script developer and we’ve often featured solutions are reports that Tanaike has shared. With this in mind Tanaike’s list of Google Apps Script resources is well worth a browse.

Source: tanaikech/taking-advantage-of-google-apps-script

Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script

Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script – submit.md

An example script from Kanshi TANAIKE which lets you test the new onSelectionChange(e) simple event trigger in Google Sheets.

The onSelectionChange(e) trigger runs automatically when a user changes the selection in a spreadsheet.

In the example shared this is used to detect the user changing Google Sheet tab.

Source: Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script

Interacting with multiple hyperlinks in Google Sheets cells with Google Apps Script

Before this, when a cell has only one hyperlink. In this case, the hyperlink was given to a cell using =HYPERLINK(“http://www.google.com/”, “Google”) but by a recent update, a cell got to be able to have multiple hyperlinks … In this report, I would like to introduce the method for setting and retrieving the multiple URLs for a cell.

Hyperlinks in Google Sheets cells is a bit of an obsession of mine and it’s nice to see Kanshi TANAIKE has a similar passion. Google are rolling out multiple hyperlinks in Google Sheet cells and Tanaike has provided details on how the hyperlink values can been get/set with Google Apps Script (the official docs are still catching up with Tanaike’s discovery :)

Source: Updated Specification of Google Spreadsheet: Multiple Hyperlinks to a Cell

Benchmark: Loop for Array Processing using Google Apps Script with V8

Benchmark: Loop for Array Processing using Google Apps Script with V8 – submit.md

Kanshi Tanaike has published some useful benchmarks looking at the process time for various loop methods comparing the old Google Apps Script runtime with V8. Something to keep in mind that while there are performance improvements there is a cost as calls to G Suite services:

Source: Benchmark: Loop for Array Processing using Google Apps Script with V8

EncodeApp by tanaike (The Thinker)

EncodeApp is a GAS library for retrieving the encoding set (charset) and doing URL encode with the specific encoding set using Google Apps Script (GAS). – tanaikech/EncodeApp

Library’s project key: 1DsJdRQ9D6nXgbxVVvOroM3EYJOcB197Isvt2Sl4sziW3m9IqqeB9YoWy

Source: tanaikech/EncodeApp

Resumable Upload For Google Drive with Google Apps Script Example

This is a Javascript library to achieve the resumable upload for Google Drive. When a file more than 5 MB is uploaded to Google Drive with Drive API, the resumable upload is required to be used.  tanaikech/ResumableUploadForGoogleDrive_js

Kanshi TANAIKE has some amazing GitHub contributions and this is another one. Whilst this is designed as a Javascript library you can use in any project Kanshi provides and an example of how this could be used in a Google Apps Script add-on.

Source: tanaikech/ResumableUploadForGoogleDrive_js

syncGoogleScriptRun – use google.script.run with the synchronous process – tanaikech

This is a Javascript library to use “google.script.run” with the synchronous process – tanaikech/syncGoogleScriptRun

Source: tanaikech/syncGoogleScriptRun