Relative Content

Tag Archive for google-sheetsgoogle-apps-script

getActiveRange() function is broken

I woke up this morning to find a program I made was encountering errors. After some testing I found the getActiveRange() function was no longer returning the correct values in my sheet.

How do I replace the forEach function in apps script when wanting to send emails listed in my google sheet?

I have a google sheet that serves as a waitlist and I wanted to be able to send update emails weekly to let people know what position they are in the waitlist. I am very new to apps script and coding and I found a solution on a question asked in 2022 in a similar situation. I tried to implement the code, but it uses forEach and it seems that is no longer a function. Any suggestions on how to best do this? I have linked the code below.
Spreadsheet I am currently using

Customising pdf export using Google App Script

In Google App Script, I am using the getAs('application/pdf') method on my spreadsheet file to export it as a PDF. When I do this, the entire spreadsheet is exported, however I would like some more control over what is exported. Essentially I’d like to mirror what is possible when you click File -> Download -> PDF. For example I only want specific sheets to be included, I want to ensure the orientation is portrait, I want certain header and footer options to be selected, and so on.

Replacing characters in cell value on form submit

I am have an App Script that has some functions that are triggered on form submit. I am wanting to remove all dashes from a submitted field (telephone number) and save them back to the sheet with the dashes removed. I have been playing with the code for awhile and cannot get it to work, although I am doing something similar on another sheet. In this case the column number for the data i need to rewrite is column 10.