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)

0
votes
0answers
14 views

Script that adds new row to multiple sheets in Google Spreadsheets

I want to add a script in Google Spreadsheets that adds new row on the second line of every sheet within a Google Spreadsheet that contains multiple spreadsheets. This will need to happen every day.
1
vote
0answers
26 views

Trello API: How to remove a member from an organization using Google Apps Script (GAS)

In a Google Spreadsheet, I have a list of Trello usernames that I want to remove from my Trello organization. How can I use the Trello API to remove all these members from my organization? I found ...
1
vote
2answers
57 views

Gmail message details stored to spreadsheet

I would like to know if there is a way that I could have specific messages in my email to go directly in a Google spreadsheet. For example I need all email messages with subject line of "X" be stored ...
0
votes
1answer
21 views

How do I sort several columns by a list of values?

In Google Sheets, I have several columns: Industry | Company | Country | Date Last Visited And I want to order them by Country, then by Date Last Visited, then by Industry, then by Company so that ...
1
vote
1answer
36 views

What's wrong with this Google Apps Script code?

Forewarning: I'm a noob at JavaScript, with varying experience and less knowledge. I don't get why this code fails with TypeError: can't call method "getSheetName"/undefined. (line 7, file "Koodi"). ...
0
votes
1answer
52 views

How to format the date in this Google Docs script

I've come across this rank checking script. I'm not sure exactly where I found it but it's built on Google Docs and a script which automates the rank checking process. I understand a bit of coding ...
1
vote
0answers
27 views

Send email from Google Spreadsheet to adress in column

From an existing Google Spreadsheet; every time a value is added in column M(x), I would like to send an email with a specified text to the address listed in column F(x) from the same row x. Which ...
2
votes
0answers
52 views

How to Modify Matched Cells Across Multiple Sheets with Google Script

My question is a fairly complex one, but I'll do my best to clarify exactly what I'd like to do and this requires some background: I have a Google Spreadsheet used for user administration in my ...
1
vote
2answers
54 views

How can I select a sheet with a variable-supplied suffix in a script?

Here is the code I'm attempting: var day=new Date().getDay()-1; var month=new Date().getMonth(); var sheet=ss.getSheetByName((/^.\s/+month+'/'+day)); I'm new to regex, but essentially I'm writing a ...
1
vote
2answers
46 views

Is it possible to prevent people from entering data into my Google Spreadsheet?

Is it possible that I fix the order of user's entries with a script? For example, the user must fill cell A1 first, only after that he can fill cell A2. Maybe my explanation is better with an ...
1
vote
1answer
17 views

Set Selection throughout all sheets

I have a spreadsheet with multiple sheets. I want them all to scroll in sync. For example if I scroll to J18 in Sheet1, all others sheets will have the cursor at J18 and same row/column at the top ...
0
votes
0answers
24 views

Google Sheet Script: “=ImportFeed” does not run if spreadsheet opened by a background script (time-driven trigger)

I have a "History" sheet which will forever store anything that has ever been in the feed and a "Feed" sheet for the current imported feed (i.e. it just contains =ImportFeed) This Google Script runs ...
2
votes
1answer
28 views

How can I reference a cell in a custom function while setting up data validation in Google spreadsheets?

I made the following Google script to check whether a string is less than some length: function isLengthLessThan(length, text) { return (text.length < length) }; How can I set up data ...
1
vote
1answer
32 views

Add a sheet from a template

Is there a way to add a new sheet to a spreadsheet from a template? If I'm using a template for time, I'd like to add a new sheet from the same template every two weeks.
0
votes
0answers
44 views

Google FormsApp: Change item based on answer

Is it possible to change item, in my case - checkbox, based on user answer? For example, I have Date item, where user have to put his/her birthday, and then if user is born on 2001 or later, then add ...
0
votes
0answers
32 views

Getting error while using a Google Forms/Spreadsheets Auto-Increment Script

Similar to Kelly's problem here: Can I add an autoincrement field to a Google Spreadsheet based on a Google Form? I need to create a unique ID upon submission of a form which will be used as a case ...
1
vote
1answer
126 views

Send an email with attachment using Google Apps Script

I have a Google Spreadsheet with a list of emails. I want to build a routine that send email automatically to those email addresses. I also want to attach a PDF to this email. The PDF file is located ...
1
vote
2answers
62 views

How can I merge into one cell, all the non-zero values in a row each concatenated with the column header?

I hope this example is clear. I have played with join and filter but can't get the Summary field to display as below: Row 1 is a list of subjects. Row 2 is a teacher's subject allocation ...
2
votes
1answer
26 views

Google Sheets Passing Range from separate sheet into custom function

I have the following custom function I've built to basically reproduce a needle haystack type of functionality function ListBy (Range, Range2, needle) { var holder = []; if(typeof Range != ...
1
vote
1answer
41 views

How to send cell as argument for function?

I am trying to write a custom function for Google spreadsheets that checks the formatting of a given cell and acts accordingly. I know that I can give a string as argument and get it to work but then ...
2
votes
1answer
85 views

Prevent “invoked too many times per second” error in Google Apps Script

I have a Google spreadsheet consisting of different months on each tab. Every month, I add a new tab and another 50-75 rows. There are many tabs. There is a cell on each row which calls a custom ...
0
votes
0answers
45 views

Pull data from one sheet (has a locked cell) to another sheet (has a locked cell) every day automatically?

I have a dynamic Google spreadsheet to which I add one more sheet every day. I want to take the data from sheet1 cell D96 (a protect cell) to sheet2 cell D3 (a protect cell) every day. I found a ...
2
votes
1answer
40 views

Formula value change after a script pastes into another range

I have a script that pastes a formula from one cell into a range in a column. When pasted the range just disappears. I mean the whole formula is OK except the pointer. Any ideas how to deal with ...
0
votes
0answers
58 views

Sort all sheets by column 1 in first sheet

I’m trying to sort or autosort an extensive Google spreadsheet with various codepending sheets. I have tried to use the sort function but that is to blunt to use in this case. I’m hoping to get some ...
0
votes
0answers
64 views

Google apps script for text documents: regexp replace to footnote / link

Using Google apps script, in a google text document (i.e. just a regular documenet), I would like to convert the following string { some text | footnote | link } to some text with a ...
1
vote
1answer
55 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
103 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
117 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). ...
3
votes
1answer
124 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 ...
3
votes
1answer
80 views

Individual time stamps for individual sheets in a Google 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
40 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 ...
1
vote
0answers
35 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
82 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
43 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
81 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
83 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
469 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
99 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
136 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
110 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
70 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
491 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
97 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
48 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
1answer
876 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
37 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 ...
3
votes
1answer
340 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
53 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
140 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
631 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: ...