当查看某个工作表时,Google 应用程序脚本中是否有触发器?请给出一些示例代码。预先感谢..
也许你可以在有人编辑时使用触发器和 getActiveSheet 方法。 比如:
let ss = SpreadsheetApp.getActiveSpreadsheet;
let sheet = 'stack questions';
let activeSheet = ss.getActiveSheet();
if (activeSheet === sheet) {
console.log(`The sheet ${sheet} is in use`):
}
else { console.log(`The sheet ${activeSheet} is the one in use`)}