How can you track click events in a Google Apps spreadsheet script?

I am managing a Google spreadsheet using a script. The onEdit function works fine - I can color the cell red by setting

SpreadsheetApp.getActiveRange().setBackgroundRGB(255, 0, 0); 

in the onEdit function. However, I would like to do the same code in the onClick function, so when a user clicks on a cell, it immediately turns red. Is it possible to do this? I cannot find a way to do this in the documentation.

+6
source share
3 answers

As stated in the comments above, before there is no way (right now) to create the onClick() function for Google Spreadsheets. This makes sense because the server processes the google app script functions, the amount of load generated when the onClick() events are onClick() pretty easily depletes the entire quota of requests provided by default.

You must use the documentation to create the button and click on it .

+1
source

You can get closer ... Create a validation for cells with the option ... for example, Finish. Click the drop-down list, select Done. now create an onChange or onEdit trigger to fire. You can get a context-sensitive cell / range function .... for example, firing on a row or column. It is easy to replicate and program for

0
source

All Articles