Category "google-apps-script"

TypeError: Cannot read property 'getRange' of null [duplicate]

I have a spreadsheet with data in columns A:Z. In column AA is the name of a sheet in the workbook. I'm trying to copy the data in A:Z to th

Saving as CSV through google script handling newline characters

So I'm attempting to take a sheet from a Google Spreadsheet and save it as a .CSV file just like you can manually do. It is working fairly well, but I've ran in

Protect Sheet when condition is met by change (Google Sheet)

There is a case where test is given to a certain student. The student can only work with the answer for the test before a given period. Here is the sample case:

Google Tables (Area120) How to update Checklist field type?

This is for an Area 120 Tables There are simple checkbox fields and Checklist field types. I cannot find in the Documentation how to update the children items i

Google Apps Script JDBC ResultSet to Array

Is there a better way of retrieving the results from a ResultSet? Calling getString() on each value is very slow. It takes up to 2.5 seconds to put about 400 r

TypeError: Cannot read property 'getRange' of undefined

Why AppScript in google sheets doesn't find the range in the sheet?The SpreadsheetApp finds the sheet but shows error in line 6. I tried ActiveRange and just ge

Asynchronous execution of a function App Script

I've been digging around, and I'm not able to find references or documentation on how I can use Asynchronous Functions in Google App Script, I found that people

Embed Google Form in Gmail using Apps Script

I'm trying to use Apps script to embed a prefilled Form in an email. The emails will only be sent to Gmail users. I want something that works the same as pres

How to use for to sum a range in google app script?

I want create a simple custom sum formula in google Spreadsheets using google app Script. function somaDias(range, days) { var sum = 0; for(i=0; i<d

Google Apps Script: Connecting to Amazon Selling Partner API (Access Token)

I'm trying to connect to Amazon Selling Partner API using Google Apps Script. The first step based on the documentation is to generate an access token if we don

Create new file in a folder with Apps Script using Google Advanced Drive service

There are four ways to create a new file: DocsList - Shown as DocsList in the Main List. Built in to Apps Script. DriveApp - Shown as Drive in the Main List. B

Performing calculations on Google Forms

I am trying to create a Google Form for an event registration. The admission charges to the event vary for the adults and children. An user can specify the numb

Run script on Sheet(tab) selection/change

I would like to know if there's a way to automatically trigger a script every time a specific sheet, inside a worksheet, is selected. Looking around I found the

Google apps script not identifying sheet correctly

I'm running a templated google script that constructs an html page with the contents of a google spreadsheet. When I run the script with the spreadsheet https:

Calling an API in Google Sheets only when changed have been applied to a cell

I'm Thomas and pretty new to appscript. I managed to use it in order to translate cells in a google sheet using DeepL API. I did it thanks to this post : https:

Google apps script - Auto Fill Column?

I've just learnt about arrayformula and continue for keeping formulas into new rows, now im trying to get a single string to copy into new rows "N". How can I a

google script detect empty cell after edit or delete

I have a problem with my code. It seems fine but it doesn't work and I really don't know why. I tried everything. I want sync my google excel with my google c

Work around for JSON data import in Google Sheet using custom script

enter image description here I want to import data from a table within an HTML page. Used IMPORTHTML =IMPORTHTML("https://www.fpi.nsdl.co.in/web/Reports/FPI_For

I need to accurately find the form response id using google scripts

I have a simple form and I want to forward the response pages to my email address so I can click through straight to the result of that form submission. Using t

How to split single rows into multiple rows depending on whether one cell has values separated by commas or new lines in Google Sheet?

The spreadsheet has some cells with cell contents that are separated by commas, or a new line. 123, 876, 456 Column "C" is the column that determines whet