3

I faced the same issue, suddenly I started getting the error on the execution of the script. Exception: Service Spreadsheets failed while accessing document with id The issue was in the formulas that were linking to the range that was shifted. So modifying formulas that use the problem ranges (if you run the script from the editor, it shows on which step ...


3

If you can use getCurrentCell, then instead of throwing an exception, it returns null if there is no active cell. There are some difference between the getCurrentCell and getActiveCell though. With getCurrentCell, you can do this: var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Reservations'); var cell = sheet.getCurrentCell(); if(cell) {...


1

The error occurs because data[0] is undefined and that might happen when Column A hasn't any `yes'. Since you are using a onEdit trigger add the following before line 21 if(!data[0]) return; The above line will terminate your script if data[0] is undefined


1

Using the edit event object. function changeFontColor(e) { e.range.setFontColor('Red'); } On the first line e is used to "catch" the edit event object. On the "last statement" e.range is used instead of dataRange. All other statements aren't required. Using getActiveRange (no edit event object) function changeFontColor() { var ...


1

Warning The code from the referred answer deletes permanently the messages from the Gmail Trash. We should not copy and execute code that we don't understand. It's very likely that the referred error message occured because the following code line was not edited: var mymail = "email@gmail.com"; Replace "email@gmail.com" by Session....


1

No. I am hoping to understand the above and thus be able to tell whether a different G Suite user running my script as a web app using their own log-in will count towards my execution time quota or theirs. See the Tanaike's answer to Is there any limit on number of concurrent hits or simultaneous executions on Google App Script Web App. Summary: web apps ...


1

This answer is not offered as an explanation of how to insert a webp image into a table in Google Docs. Cătălin George Feștilă has already answered that question. You mentioned, in passing, that you didn't know how to "insert [the image] inside the table". Google Script - Insert image in a Google Doc Table from StackOverflow addresses this issue ...


1

I don't think you can do this, see documentation: contentType String The MIME type to convert to. For most blobs, 'application/pdf' is the only valid option. For images in BMP, GIF, JPEG, or PNG format, any of 'image/bmp', 'image/gif', 'image/jpeg', or 'image/png' are also valid.


1

Your existing code needs only a few tweaks: if(wsName == mainWsName && c == 17 && r >= startrow){ You are trying to detect a value entered in Column Q, so your need to test for c == 17. In addition, I modified "r" to r >= startrow since this allows you to declare startrow as a variable, and re-use it when updating the value ...


1

Explanation: You can simply check whether the new value in column A is blank. If it is blank, then set the value in column B also to blank, otherwise, set date. You can use a Conditional (ternary) operator to achieve your goal in one line of code. Replace the last line: cell.setValue(date); with: e.value == '' ? cell.setValue('') : cell.setValue(date); ...


Only top voted, non community-wiki answers of a minimum length are eligible