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)

1
vote
1answer
12 views

How do I use a variable to reference another variable in Google Apps Script?

I'm trying to create a loop that sets values of a set of variables, and I want to use the incremented loop variable to define which variable I'm setting the value of, like this: var box1, box2, box3, ...
1
vote
1answer
21 views

Create help pop-up in Google Document using Google Apps Script

I am trying to create a Google Document that has complex questions we ask clients. I want to add a link at the end of each question that will launch a pop-up for additional information. I currently ...
3
votes
0answers
32 views

How can I create a Google Spreadsheet whose name and cells auto-complete with cells completed on another sheet?

I'm using Google Spreadsheets to manage projects, and I'm not familiar with scripts or macros (though I'd really like to learn how to use it, so if you have any good tutorials or tips, let me know). ...
2
votes
0answers
26 views

How Can I Solve Error “Exceeded maximum execution time” in Google Spreadsheet?

I found a script which I really need (link) but it gives an error (Exceeded maximum execution time) generally. How can I solve this error? This is the script: function getTotalSum(cell) { var ...
2
votes
1answer
38 views

Google sheets: Individual time stamps for individual sheets in a spreadsheet containing multiple sheets

I am using the New Google Sheets, and I have created a "Master Document" that contains a multitude of sheets, with each expressing different kinds of data. I want a "Last modified" time stamp to ...
0
votes
0answers
28 views

How to create a simple dialog form in Google Spreadsheets with GAS

The functionality that I am going for is this: Click on a menu option Interactive box comes up with 6 textboxes that correspond with a label each In two of those boxes, at most three, a number is ...
0
votes
0answers
13 views

Google Apps Script with forms to check if a doc url is 'shared'

Does anyone know "IF" it is possible to use Google Apps Script with a Google form to auto check "IF" a document URL pasted into the form is a "shared" document? I'm a teacher and I use Google forms ...
0
votes
0answers
22 views

Google apps script authentication

I am an admin on two Google Apps accounts. I was looking for a way to auto force users to change their password every x number of days when I found this post: ...
1
vote
1answer
30 views

return name of range as string

I have a range that is named apple in Google Spreadsheets. I thought a method like getRangeName("apple") would exist. I want to get the names of many ranges and set them as the header for the ...
1
vote
0answers
58 views

Can I make a Google spreadsheet deploy as a web application?

Well, this is what I'm planning to do: my spreadsheet looks almost done to me (a few changes here and there of course, but that'll continue forever). I want to deploy it as a web-app and then who ...
2
votes
0answers
68 views

How to make script slow down in GoogleSheets Script Editor?

I have a script thats attached below, and the problem I'm facing is that after it has keyed in "ticker" to Raw Data in b1, my entire sheet is never done loading and thus when its time to check if it's ...
2
votes
1answer
87 views

Export all sheets in a spreadsheet to csv in Google Apps

Is there a way to export all sheets in a google spreadsheet to csv as individual files ?
2
votes
2answers
80 views

Incrementing value read from spreadsheet exploding. 1 + 1 = 200 000 000 000

I read a value (in this case 7) from a Google Spreadsheet with a script, increase that value using source++ and write the increment back to the spreadsheet. I expect a series of 7, 8, 9, 10. ...
1
vote
2answers
66 views

Automating Calls to New Google Sheets Add-ons

I'm building a Google Spreadsheet that uses an official add-on to pull data from Google Analytics using the new add-on store. What I'd like to have it do is automatically refresh the data every day at ...
0
votes
0answers
101 views

How do I use a script to reference multiple cells in relation to the host cell? [duplicate]

I'm trying to make a script for a custom function in Google Spreadsheet to work out the hours worked in a day. My problem is after searching I can't work out how to reference cells relative to the ...
2
votes
0answers
43 views

Can a Google Spreadsheet be recalculated if it's not manually opened?

We have some Google Spreadsheets that use the ImportHtml() to pull in some real messy tables. Then on on an alternate page we access the above data and pull it into a nice cleanly formatted table via ...
1
vote
1answer
132 views

Does IMPORTDATA() refresh when an Apps Script runs even if the sheet isn't open?

We have a Google Spreadsheet that pulls data from an external source via an IMPORTDATA() function and then a Google Apps Script that is on a timed trigger that performs other things with the imported ...
2
votes
1answer
67 views

Updating logging sheet from another sheet doesn't work after inserting code offset

I am trying to log the data, formulas and times of cell edits from one sheet into a logging sheet. The problem I am having is that it only seems to record changes made in the logging sheet. This has ...
1
vote
1answer
38 views

Need to Make this Code Sheet Name specific rather then the active sheet

I got this code on here but need to modify it so it only sees 3 sheets. 1 is Active Tickets. 2 is Closed Tickets. 3 is Pipeline. This is the code i currently have: function onEdit(event) { ...
1
vote
0answers
325 views

Get cell row and column index in Google Spreadsheet

I have spreadsheet with two sheets inside. The name of the first sheet is "fr" and the name of the second sheet "cql". Now the first sheet contains data as the picture given below. And the second ...
1
vote
1answer
27 views

How to capture a cell when entered or selected?

I am trying to capture, programmatically, the on cell entered and on cell selected method, but I don't seem to be able to find any documentation on it. I can get the time stamp for exiting the cell ...
2
votes
1answer
129 views

How to export / import a Google Apps Script as a file into a new spreadsheet?

I fear this may have an obvious answer, but I've been knocking my head over this and can't find it! When creating a new spreadsheet, we can easily create a script within it. I like to call it a ...
2
votes
2answers
39 views

How can I apply a script to every sheet but the first one on a spreadsheet?

I've been working on a shared Google spreadsheet on Google Drive. The document has different sheets with a "Last Modified Date" Cell. I found an script for this to be auto-filled searching here: ...
2
votes
1answer
126 views

Referencing cells above and to the left in script

I'm trying to make a script for a custom function in google spreadsheet to work out the hours worked in a day function hwtd(). I've got it perfect in the cell (((F8-E8)+(F9-E9))+(IF((F10<E10), ...
2
votes
1answer
245 views

Date and time stamp automatically added in column

We have a barcode scanner that we use to track student assignments. I am trying to create a Google Spreadsheet that tracks the assignments for each subject. I have been using the following script: ...
0
votes
0answers
121 views

Running a Google Web App Script in a Google Site on iPad 'X-Frame-Options' error

I have written a Google Web App Script that is embedded in a Google Site. It runs fine on desktops (bar Firefox on Mac, actually. Anyhow...), but not on an iPad in Safari / iOS 7.0.4 (it's fine on iOS ...
0
votes
0answers
82 views

Pass range in Google Apps script custom color sum function without using A1 notation

I want to sum up lines with Google Spreadsheets where the cells have a certain color. Since it needs to be copied down I want to have a function that doesn't use the A1 notation. There is already a ...
1
vote
2answers
344 views

Google Spreadsheet; Function to Search a Sheet for String and Return Value of Next Column

Here is what I have so far. it will: Search for keyword in my other sheet (JSON) When it finds the keyword (modname) it returns the row # The keyword is on the A column. What I want is for a ...
1
vote
1answer
105 views

Calculate score and ranking in Google Spreadsheet

I want to create a Google Spreadsheet which will work as a ranking system for a game. One sheet, "Ranking", should display the current ranking of the players, based on their points. Another sheet, ...
2
votes
2answers
64 views

Can I convert a MS Word document to a Google Document format using GAS?

I know how to convert a Microsoft Word document to Google Documents format manually (right click, open with Google Drive). But is there any way to do this using Google Apps Script? I have looked ...
0
votes
0answers
52 views

How do I sort forms individually based on individual events in Google Forms?

My purpose is to conduct 5 events, namely 1,2,3,4,5 say ... I'm using a Google form to accept responses from people. Emails are sent to people automatically and they can register for more than 1 ...
1
vote
1answer
255 views

Get the Id of the response from Google Forms via a Google Apps Script

How do I get responseId ? var form = FormApp.openById('myGoogleFormID'); var response = form.getResponse(responseId); function onSubmit() { // Here I'd like to get the id of the current response } ...
2
votes
1answer
87 views

Place cell data from a Google Spreadsheet into a Google Document

I'm trying to populate an invoice. I have a Google Spreadsheet that calculates hours per project, and I want to bring that into a Google Document, but despite much searching, have found no way to do ...
1
vote
1answer
37 views

500 error with Google admin sdk

I'm using the Admin SDK with Google Apps Script to create a directory of user's names and emails on a Google Site. The code seems to work fine because when I view the logs I see the results. ...
-3
votes
1answer
175 views

How do I conditionally format based on the value of cells in a column?

Unable to create a script. I would like to know if there is one that would allow me to color an entire row based on the value (a different color value) that I will find in the cells of column B. For ...
1
vote
1answer
155 views

Using the Google Admin SDK

I'm trying to use the Google Admin SDK to get all of the users for a directory on our site but I'm trying to figure out what exactly page on line 4 of the code means. function listAllUsers() { ...
0
votes
1answer
33 views

Google spreadsheet, sort adds a bunch of rows

I have a function that sorts a table, unfortunately when I call my function it adds a bunch of empty rows at the bottom that I don't like. var kotlijst = SpreadsheetApp.getActiveSpreadsheet() ...
2
votes
1answer
77 views

Putting my company directory into Google Sites with pictures

I'm using this code to pull the name and emails of my users into an intranet page on Google Sites. I was just wondering, is there some code that I can add to this so I can retrieve pictures? I would ...
1
vote
2answers
90 views

Make a counter, that counts cell change

I have a cell, let us call it A1, that contains an IF function. Cell A1 changes between two types of text: Healthy Injured What I want is a counter in for example B1 that counts how many times A1 ...
0
votes
0answers
38 views

How to change Google Apps Script locale?

I created a Google Apps Script on the Google account, which had the Polish language set in the settings. Executing the script was causing some Google error message about exceeding quote Gmail rateMax, ...
1
vote
0answers
79 views

How to enable Drive Service in Google Apps Script? [closed]

I am getting this error The feature you are attempting to use has been disabled by your domain administrator. When I try to use DriveApp in Google Apps Script. The domain administrator tried to ...
2
votes
1answer
1k views

send HTML email from a spreadsheet using a different alias

I've been frolicking around sending emails from Google Spreadsheet. The sent email has two requirements to fill: It needs to be send from my work-alias It needs to be as HTML I can do the former ...
1
vote
0answers
40 views

Simultaneously sort multiple ranges on a single sheet in varying orders

I am trying to find a way using a script if possible (or formula) that will allow me to reduce the number of operations that I have perform to sort data in a particular google spreadsheet. Currently, ...
0
votes
0answers
82 views

Automatically create a calendar document using Google Drive and Google Apps Script

I have a question regarding Google Docs and Google Apps Script. Is it possible to use Google Apps Script to 'automatically' create a calendar document in Google Drive with the following document ...
-1
votes
1answer
38 views

Help with a previous question you answered

I noticed this code from a thread I was reviewing as I needed the same functionality to provide a timestamp when a particular row is edited in a Google Spreadsheet; function onEdit() { var s = ...
1
vote
1answer
74 views

onEdit only updates top row after pasting (editing) multiple rows

I'm using a Google Spreadsheet and have a script that updates the "last email" column with a date stamp when an employee enters an email address into the prior column. The problem occurs when my ...
2
votes
1answer
262 views

Google Apps Script - exceeded maximum execution time

I'm currently developing a new spreadsheet for my company to make one of the tasks we do on a weekly basis more easier - the way it works is data is imported into this spreadsheet and then the scripts ...
1
vote
1answer
312 views

In Google Script, get the spreadsheet cell calling a custom function

In VBA for Excel, I can get the column of the cell making the call to a custom function like this: ThisCol = Application.Caller.Column What is the equivalent in Google Scripts? I've been trying to ...
2
votes
1answer
163 views

Arrayformula with dates before and after

Here is what my spreadsheet looks like I enter recurring weekly payments details in G,H,I,J & K (Name,Amount,Day of week, Start Date, End Date respectively). This arrayformula: ...
0
votes
1answer
72 views

Time Triggered Script to Change Cell Contents

What I want to do is for example: A time will be manually entered into a cell say D3, when it is 20 minutes before this I want cell D1 to change to "20 MIN", WHEN IT IS 5 minutes before I want to ...