Google Apps Script (GAS) is a JavaScript cloud scripting language that lets you extend Google Apps and build web applications.

learn more… | top users | synonyms (1)

2
votes
1answer
37 views

Add email hyperlink to spreadsheet

I have a spreadsheet where I track incoming email questions and outgoing responses. As questions come in, I have a script that appends a row (using .appendRow()) with information in the first few ...
2
votes
1answer
64 views

Can I add two calculated fields to a Google Spreadsheet based on a Google Form?

I am new to Google Scripts and am hoping for some guidance on improving a manual process I complete in Google Sheets. To analyse the data I receive on a Google Form I run, I manually add-in (or copy ...
1
vote
1answer
128 views

Google script match values from a column in one sheet to a column in another sheet

I'm trying to filter two columns in Google Spreadsheets, say A in sheet 1 (which contains work order numbers) and A in sheet 2 (which contains the same strings of work order numbers but they are ...
2
votes
1answer
179 views

Can I trigger a Google Apps Script with a HTTP POST?

I've been looking through all sorts of info about Script and haven't really found anything in regards to triggering a script with a HTTP POST. I'm looking to send one or two POST requests per hour to ...
1
vote
1answer
32 views

Trouble renaming a pdf file created in Apps script

I used Google Forms to make a 20-question quiz and added a page to the response spreadsheet that automatically grades the quiz immediately after it's submitted. I have this script in place to ...
2
votes
1answer
43 views

Auto create sheets within a spreadsheet with formatted columns and cells

What I would like to do is be able to run the script and have it create 4 new sheets (within the current sheet I'm in) with the following formatting in each: 1st row frozen with column headings on ...
1
vote
1answer
46 views

Find in range and go to cell. Trigger On form submit not working!

I am using a script that checks column range B2:B for a specific value contained in a cell of another column (the value in this cell deliberately corresponds to the last value in the column B) and ...
2
votes
1answer
70 views

Periodically updating a URL in the ImportXML command with a script

I am using importxml to extract prices from multiple websites. My main concern is to be able to refresh the prices whenever I want and not be dependent on Google's hourly update. I am using this ...
0
votes
0answers
30 views

Your Time stamp code

I have copied and pasted your code to put a time stamp on a spreadsheet that I am working on and it is working great. Except the day is coming back as "56" for some reason and I don't know why. It ...
1
vote
1answer
41 views

How can I automatically set “sheets last updated” in a cell on Google Docs Spreadsheets?

Simple task!.. output a date and time every time something in the sheet is edited! function onEdit() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets("Data"); var ...
2
votes
1answer
54 views

Auto Sort Google Sheet with onEdit function

The following function successfully sorts my file (containing 3 sheets) individually. When I hit the "play" button on the script, it properly sorts (as expected) the current (active) sheet. Since my ...
1
vote
1answer
72 views

Google Apps Script Exceeded maximum execution time

My code for an API pull has been timing out a lot lately. Here is my code (note that I have changed some variables for privacy): // SHEET DATA var ss = SpreadsheetApp.getActive(); var data_sheet = ...
2
votes
1answer
96 views

Using Google Apps to handle customized after hours auto responses to support based email inbox

THE SETUP: Our company has a primary support email that all of our clients use to generate helpdesk tickets. It is a google apps inbox using helpdesk@%our primary domain% Our ticketing support auto ...
5
votes
1answer
90 views

Probability Density Function of a Chi Distribution

I'm trying to write an extension for Google Sheets to add the CHIDIST() function as in Microsoft Excel and LibreOffice Calc. My current attempt does not produce the same results as the LibreOffice ...
2
votes
2answers
71 views

Truncating the Title in the HYPERLINK function in Google Spreadsheet

I have a number of URLs that I first convert from text to the HYPERLINK function and then want to edit the title-section of this function, so that only the domain is visible in the cells. I attached ...
-2
votes
1answer
53 views

Lock a column based on the date

I have an Employee attendance register in Google Sheets, wherein I want to lock the particular column/s after the date is passed over. This feature is required for the clerk to enter the date on the ...
0
votes
0answers
12 views

Bound Scripts in Google Sheets on iPad and Android Apps [duplicate]

I created a Google Sheet with a bound app script on my desktop but the scripts do not run on the iPad or Android apps for Google Sheets. Does anyone know if this can be done?
2
votes
1answer
106 views

Print several non-consecutive columns of a Google Spreadsheet using a script

I have script for print. I need print range without some column (e.g. print just B,C,D,E,G and miss F) and without all notes in sheet. The script below prints all the columns. function printPdf() { ...
4
votes
1answer
476 views

Show URL used to edit responses from a Google Form in a Google Spreadsheet by using a script

I'm trying to make the edit URL for a Google Form automatically populate in the response Google Sheet that it's attached to. I've seen this already and want to use it, but I'm having issues trying to ...
3
votes
1answer
84 views

Timestamp in two columns

As a teacher, I am trying to create a Google sheet for the students to use as they sign in and out of class. I have successfully used code to auto insert a time stamp into column A if Column C is ...
0
votes
1answer
47 views

Can I cut and paste projects from a Google sheet using a script?

I want an automated method of cutting and pasting completed projects from one sheet to another sheet. I want to have a column where users can go in and type "DONE" at the end of a row to state that ...
1
vote
1answer
21 views

Remove any sheets not listed in an array

I have a Google App Script that has 6 sheets. onOpen, I would like to see if the user created any additional sheets, and if so, delete them. So far, I have: function onOpen(){ var ...
1
vote
0answers
30 views

Slow add-on: ~13k named ranges in empty document

I've created Google Apps Script for Google Documents which uses NamedRange for keeping track of the text inserted by the script. The script is bound to the Document, because I use methods, which would ...
1
vote
1answer
121 views

Getting values from other sheets with a custom function

I've defined the following function, and use it in sheet1: function myfcn (sheetname,rowstart,rows,columnstart,rows){ var sheet= SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetname); ...
1
vote
1answer
88 views

Automatically record daily values in a new column

So I have this spreadsheet I use to control Content funnel. I've come up with a few formulas to use something else than a pivot table. But in order to get the trends and alarms I'm looking for, I need ...
1
vote
1answer
56 views

How to receive a notification when changes are made to a specific tab in Google Sheets?

If would like to receive an email notification if a new row is added to a specific tab in a Google Sheets. The default notification rule settings are too limited and the Google Sheets Add-on Store ...
1
vote
1answer
288 views

Send recurring reminders to Google Form respondents

I need to create a Google form like below : My objective is to send an reminder of Activity Described in < Your Activity > Question Then I need to send reminder email to email mentioned in < ...
0
votes
0answers
102 views

google.script.run.withSuccessHandler not working

In my Google Sheet script's page.html, I have <input type="button" value="Apply" onclick="google.script.run.setAttributes('abc');"> where setAttributes() is a function defined in Code.gs. ...
1
vote
1answer
63 views

How should I automate graph generation and image output in Google Sheets?

I am trying to send graphs of data to email recipients. I would like to output images of row-specific graphs based on cells in a Google Sheets document. In combination with Google Sheets/Drive, I am ...
1
vote
2answers
1k views

Basic date manipulation in Google script

I would like to define a custom function in Google Sheet. This function should do something very simple, yet I have not managed to find how to do it. I am very confused with all the answers I read ...
1
vote
0answers
26 views

DocumentApp highlight NamedRange - use Comment?

I'm using NamedRange a lot in my script and I would like to highlight it's position in document. I'm currently toggling background color of it via custom button, but this is not convenient. I would ...
1
vote
1answer
231 views

How to retrieve email address of current user?

In Google Spreadsheet I am having the following issue: I am using Session.getActiveUser().getUserLoginId() to fetch the current user's email id but other than creator of the spreadsheet it is ...
3
votes
1answer
294 views

Adding a Month to a Date in a Google Spreadsheet with a Script

I'm trying to create a Google App Script that adds one month to a date already on a Google Spreadsheet. In the example below I was trying to take the date from cell B2 (1/1/16) and add one month and ...
2
votes
1answer
831 views

Import JSON to Google Sheet using Google Apps Script

I am using Apps Script in Google Sheets to import JSON from Google Analytics. I have previously used the ImportJSON function to easily get the JSON from an open API just using =ImportJSON(url) within ...
0
votes
0answers
94 views

How Can I Protect Specific (More Than One) Ranges

I have 13 Spreadsheets sharing different people and every day i copy(or editors copy)from before day's sheet and the spreadsheet has lots of formula so i try to lock them for no one mess them but it ...
2
votes
2answers
103 views

Google Sheets/Forms/Script: How to send an email then replace “@” with “#”

I am trying to create a script where the user gets an email (column 1) with the body being column 2. However, after that, I want to replace the "@" in the email with a "#" so that they do not get the ...
2
votes
1answer
125 views

Register your Apps Script application and retrieve the client ID and secret for oAuth dance

How do I register an Apps Script project and get the Client Secret for oAuth, and set the callback url?
0
votes
1answer
62 views

Why doesn't my onEdit Function behave the same as my onFormSubmit

With the excellent help of this site I was able to get my onFormSubmit working. However I need the same thing to happen on another sheet only it has to happen after a cell has been assigned one of two ...
1
vote
1answer
25 views

Google Apps Script E-Mailing Stale Data

I have a Google Apps Script that, onFormSubmit, copies a template spreadsheet and populates it with values from the form. It then takes the new spreadsheet, converts it to PDF and e-mails it (as a ...
0
votes
1answer
43 views

How do I pass a range on another sheet within the spreadsheet file to a custom function?

I know how to pass simple ranges to a custom function (ranges in the same sheet as the function usage). How can I pass the address of a cell in a different sheet to that function. For example A1 has =...
2
votes
1answer
90 views

Can this script be more optimized and why is it running slow sometimes?

I just started using Google App Script and wrote this script (mostly copy and paste) to check the status of my website and its pages. Sometimes, mostly after opening the spreadsheet, but even if it ...
2
votes
2answers
250 views

“Incorrect range height” error in Google script when using setValues

I am trying to convert calendar dates to fiscal dates. I've been successfully able to do all that. My problem is trying to write the fiscal date values back into the spreadsheet. Here is the code: ...
6
votes
1answer
82 views

Test Google Spreadsheets Add-On with custom functions

I have set up a Google Apps Scripts project with the intent of creating a Google Spreadsheets add-on with custom functions. However, when I use the option "Test as add-on", I can't use the functions ...
2
votes
1answer
133 views

Access Google Spreadsheet revision history through API

Is there any way I could access Google Spreadsheet revision history through the API? The reason for that is I have a lot of sheets and simply relying on build-in revision history does not suffice to ...
2
votes
2answers
316 views

Automatically copy and paste cells that have just been updated to a list from forms

I have a spreadsheet that collects information from two different forms. Each form feeds a different sheet in the spreadsheet. There are 3 other sheets that the info from either of the first two forms ...
9
votes
2answers
470 views

Google Sheets - Script to change individual text color within a cell

I have a Google spreadsheet with hundreds of employee names for a schedule. Each cell has multiple names within that cell that look like this: First Last First Last First Last First Last First Last ...
2
votes
1answer
60 views

How can I round a Google Form input to nearest .5?

I'm trying to write a script that will calculate based on user input from a Google Form and then send a customized email based on the input provided. I've written an apps script bound to the ...
3
votes
2answers
342 views

Ways to learn google apps script language? [closed]

I've been looking for a good way to automate my google docs and sheets on drive, buy haven't found specific answers or even general ones I can modify to work for my specific requirements. I'm doing ...
5
votes
1answer
395 views

In Google Sheets how do I duplicate a sheet along with its permission

In a Google Spreadsheet called Attendance there is a sheet called Template. The user duplicates this sheet, renames the sheet with current date and uses this sheet to mark attendance for students. The ...
3
votes
1answer
78 views

Can't find script insert option in Google Sheets

I want to add a script to Google Sheets. I watched a tutorial where to add a script one has to follow the path Insert>Script. But I found that there is no script option there. How can I get the ...