Save a sheet as pdf with onEdit()
问题 i'm trying to save a google spreadsheet as pdf and mail it to myself everytime, when a specific cell in the spreadsheet is edited. I have the script which saves the spreadsheet as pdf and emails it and it works and I also have an onEdit(e) script which does exactly what I want. But when I put them together it doesn't work. Here's the script: function onEdit(e) { var sheet1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("booking"); var index = sheet1.getRange('O5').getValue(); if(index