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
9 views

Script to delete a dynamic range of rows

I'm looking for a script that allows me to delete a dynamic range of rows. Basically I have a script that adds rows to the bottom of a list but I want another script that will delete all rows in the ...
0
votes
1answer
17 views

Using Google URL Shortener API in Google Sheets for bulk URL shortening

Recently come across similar issue to this question, where I want to add use the Google URL shortener API in Google Sheets for bulk URL shortening. However, I keep running into this error: Rate ...
0
votes
1answer
14 views

Is there a way to print the source code of Google App Scripts?

I am an old fashioned programmer and like to print the source code of Google App Scripts. Is there a way to do that?
-1
votes
2answers
29 views

Fetching JSON in Google Sheets (ImportJSONAdvanced not defined?)

Currently working on fetching data from an API with Basic Authentication. Through this script: https://gist.github.com/anemitz/8cc6ef6c41ea4cefe51a13fbd6d8676a function ...
1
vote
0answers
29 views

How to embed Google Sheet into Google Document and keep the Google Sheet format

How do I embed a Google Sheet into a google document and keep the Google Sheet format in the document? I have got this far with the script but it's not working function updateData() { var ssUrl = ...
3
votes
1answer
25 views

Sum the totals for each product over all sheets in a spreadsheet

I'm trying to make a spreadsheet to take online orders from clients. I send them a price list, which they complete with their order and every time a client sends an order, it automatically adds a new ...
2
votes
1answer
20 views

Can I set a trigger to run every second?

While searching for answer to How can I trigger a function when switching sheets within a spreadsheet? I noticed that the Triggers for current project dialog has an option for specifying a trigger ...
2
votes
2answers
48 views

How can I trigger a function when switching sheets within a spreadsheet?

How can I trigger a function when switching sheets? Let's say I'm viewing a multi-sheet spreadsheet. Now I want a function to run whenever I switch from one sheet (tab) to another. Is that possible? ...
-1
votes
0answers
19 views

Concatenate values including column headers

I am using the following script that was kindly supplied in another answer : function mySummary(header, range) { var output1 = []; for(var i=0, iLen=range.length; i<iLen; i++) { var ...
0
votes
0answers
24 views

Set a send email account in Google spreadsheet

I have 3 email accounts, two gmail (a "corporate account" and a work account) and one personal account not via gmail. We collect requests in a google spreadsheet, where I want to add a hot mailto ...
2
votes
0answers
13 views

google docs, make summary sheet based on tags

I have a document in google docs. It is very long and I want to tag and extract only certain paragraphs into a second document that is a summary of the first document. I want to be able to dynamically ...
0
votes
1answer
30 views

“Select Users from organization” field with Google Forms?

So here is my scenerio, I have a Google form that allows users to send a co-worker a digital greeting card, but they have to manually enter the email address of the person they are sending it to. The ...
1
vote
1answer
19 views

Timestamp code for Google Sheets

I am using this script in order to put a time stamp in column B when someone edits in a row. However, I need it to place the time stamp if someone edits a row in column A. I don't need it to place a ...
2
votes
1answer
26 views

ImportRange as dependent function

I am trying to write a script which set the function importRange in a specific cell, using us KEY the content of another cell. I have the list of the KEYs in Sheet2 and here is what I wrote so far: ...
1
vote
1answer
18 views

What is a cut and paste approach to converting a chunk of a google spreadsheet to markdown table?

I maintain my web site in a version of markdown, with the common table extension. I maintain my inventory as a google spreadsheet. I'd like a quick way to copy paste a chunk of a spreadsheet, and ...
-1
votes
0answers
21 views

Export data from sheet to already created sheet

1) Find Google Sheet (Sheet 1), 2) Filter by a Column for specific name, 3) Export filtered rows to an already created Sheet (Sheet 2), 4) Automatically update Sheet 2 when Sheet 1 is edited. ...
1
vote
0answers
35 views

Google Sheets - Keep multiple sheets synced (both ways)

I need to have multiple Google Sheets be synced both ways. For example: I have a "master" sheet that has all of my information. And then I have multiple "filtered" sheets. Each filtered sheet only ...
2
votes
1answer
29 views

Delete events from Google Calendar with a specific word in the title

I'm trying to delete specific events on my Google calendar, I've found this script that delete events with a specific title: function delete_events() { //take care: Date function starts at 0 for ...
1
vote
1answer
28 views

What is the difference between creating a menu with .getUI().createMenu() and .addMenu()?

What is the difference between these two ways of getting the same thing (a new menu item)? Version 1 function onOpen(e) { SpreadsheetApp.getUi() .createMenu('My Menu') .addItem('My ...
3
votes
1answer
78 views

Problem: Script does not trigger on FormSubmit: Removing Duplicates in Google Sheet of Form Responses based on a column

I am trying to remove older duplicate form responses based on a column using the following code. The credit for the code goes to: ...
2
votes
1answer
32 views

How to select multiple, non-consecutive cells in Google Sheets using a list of the cell addresses

I have a very long, comma-separated list of cell address coordinates, shortened here for the sake of brevity: C3,C7,C17,C56. I would like to select these cells. Is this possible to do by pasting the ...
2
votes
1answer
44 views

Is there a way to automatically duplicate 8191 google sheets and name then 1-8191 + copy their urls and add them to another sheet?

Background: For a genealogy project I've created a Google sheet where participants enter all details of one ancestor. (FILEXXXX) In another Google sheet (not just another tab/sheet, another FILE) ...
0
votes
0answers
50 views

Script to create an edit response URL in Google Sheet sometimes fails

I have been using the "FormMule" addon to create "Form Edit URL" apart from mail merge. However, the triggers for the addon seemed to have stopped working. I found this post answered by Rubén: Show ...
3
votes
2answers
26 views

How to restrict a Google Script to a certain cell range?

I'm working in an automatic script that shows the last modified dates of some cells within a sheet. So far, I've succeed with the sheet restriction adding an if condition, but I want to restrict this ...
1
vote
0answers
23 views

Auomatically lock/protect a range or row based on date

Any one can help how to do a scripts for auto lock / protect range/row by date I have try but this script only lock a cell only ( cell M:M ) a = SpreadsheetApp.getActiveSpreadsheet(); var s = ...
1
vote
1answer
67 views

Export “to” email addresses from Gmail

I found a similar question here: Get e-mail addresses from Gmail messages received but the difference is that I want "to" addresses, not "from". I have a catch-all email address at my domain. Except ...
2
votes
1answer
32 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
55 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
61 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
112 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
25 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
37 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
33 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
43 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
28 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
32 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
37 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
47 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
0answers
71 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
79 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
55 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
37 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
11 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
80 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() { ...
3
votes
1answer
257 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
54 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
38 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
20 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
102 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); ...