一旦脚本运行,我希望在某个单元格中插入注释。我正在使用的脚本是插入一个日历条目 - 但是我只希望它执行一次。为此,我将获取脚本以检查是否在单元格中输入了注释/注释。从理论上讲,这应该很容易,但我无法让它选择正确的单元格......有人可以帮忙吗?我的代码如下。
我在评论后进入与 var = date 对应的单元格。如果有人能给我指点,我真的很感激!
干杯,皮特
function CalendarInputIVNShortlist() {`
`var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 2; // Number of rows to process
var dataRange = sheet.getRange(startRow, 1, numRows, 26); //What data will be used
var data = dataRange.getValues();
var cal = CalendarApp.getDefaultCalendar(); //Gets the correct calendar
for (i in data) {
var row = data[i];
var title = row[1]; // Column with Title
var desc = row[15]; // Column with Next Steps
var date = row[5]; //Column with Date
var invite = row[2] //Column with PDC Chairs & IVN Owner
var sent = row[12] //Check Sent
sheet.getRange(data[i], 5).setNote(Sent)
cal.createAllDayEvent(title, new Date(date), {description:desc,guests:invite});
var Comment = dataRange(date).setNote("Inputted")