Category : google-apps-script

I have a google sheet and I want to delete the content of several unprotected ranges. That is, I want the script to obtain the unprotected cells and then delete the content. this is what i have so far: function borrarnoprotegidos() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘mysheet’) var protection = sheet.protect(); var unprotected = protection.getUnprotectedRanges(); Logger.log(unprotected) ..

Read more

Here is the web app https://script.google.com/macros/s/AKfycbyEHj5qtIeCZh4rR6FutBLQ3N9NihreaTv7BFj4_saOfNWJUG0Tn2OtvzQs4zASYHnNiA/exec Any idea on how could I make it show up the links or hyperlinks some cells have? I have made this web form mainly following a tutorial so I’m somewhat new, I try to understand most of the code but truly it’s quite hard for me so if this ..

Read more

I have this date "2021-06-13T08:10:27.00013004+08:00" this in Asia/Singapore timezone. I want to convert it into Etc/UTC timezone and I am doing this approach. var year = new Date(actualDate).toLocaleString("en-US", {timeZone: "Etc/UTC", hour12: false, year: ‘numeric’}); var month = new Date(actualDate).toLocaleString("en-US", {timeZone: "Etc/UTC", hour12: false, month: ‘2-digit’}); var day = new Date(actualDate).toLocaleString("en-US", {timeZone: "Etc/UTC", hour12: false, day: ..

Read more

I’m working with Google Appscript, and after finally understanding the difference between the V8 runtime, the equivalent of standard library and the Web APIs, I think I developing an ok mental model for what running javascript in appscrpt involves. However, I’m now looking for a way to feature detect when I am running inside the ..

Read more

When setRows() run on an existing GridItem, the generated Form GridItem elements are fine, but the columns in the linked Sheet are reproduced in the next columns. The new columns are duplicates, but with a hidden property that shows that they belong to the Form (so we cannot delete the new columns). What is this ..

Read more