How can you monitor for click events in Google Apps script for spreadsheets?

前端 未结 6 1799
轮回少年
轮回少年 2021-01-12 13:51

I\'m managing a Google spreadsheet with a script. onEdit is working - I can colour a cell red by putting

SpreadsheetApp.getActiveRange().setBackgroundRGB(25         


        
6条回答
  •  臣服心动
    2021-01-12 14:17

    Try this for a click event:

    function onSelectionChange(e) { e.source.toast('Sheet: ' + e.range.getSheet()(.getName() + ' Range: ' + e.range.getA1Notation());
    }

提交回复
热议问题