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

E-Mail from Google Spreadsheets: including image for signature takes out formatting of message

Following situation: Sending emails from google spreadsheets. I have a compiled text (with line breaks), which is stored in var message. I have been trying to include a picture for the signature. To ...
2
votes
1answer
66 views

“getAs()” error - send an Email with Attachment using GoogleAppScript [duplicate]

I am very new to GoogleAppsScript and struggling. Here is my problem: Trying to send multiple E-Mails via Spreadsheet. Want to attach a PDF to those mails. Getting the following error: TypeError: ...
5
votes
1answer
51 views

error making a copy of google app script

I'm trying to duplicate a Google app script file in Google drive that I own, but it gives me this error Limit Exceeded: Create. This is when I'm in the file and I use File --> Make a copy... When I ...
1
vote
1answer
196 views

Sorting alphabetically (A-Z) ignoring beginning “A”, “An” and “The” using a script

I have a Movie list using Google Sheets that I would like do some sorting with using a script rather than a formula. Column A is the movie Title. I would like to be able to sort the movie titles ...
-1
votes
1answer
192 views

Google Sheet: How to Sort Names in Column Alphabetically Ignoring “The”, “An” & “A”… and then pull names (skipping duplicates) into another tab [closed]

I have searched here and all over the web. I've found ways very close to some of what I want but can't really get close what i'm looking for. Especially as complexly as I want it. I apologize if I ...
2
votes
1answer
250 views

Google Scripts UI show new row as confirmation after form submit

I have tried several things, but decided to finally ask for help with this. I am using a Google Scripts UI form like the one found with the example to insert new rows into a Sheet. After the submit ...
2
votes
1answer
379 views

Multiple auto-populated select boxes Google Sheets Script UI

I found an example of how to auto-populate a drop-down select box from a Google Sheets range, for a Google Apps Script UI that enters new rows in the spreadsheet. I have so far been unable to figure ...
1
vote
1answer
558 views

Reference a Google Spreadsheet Row containing specific Text within Google App Script for spreadsheets

I am having trouble finding a function that can reference a row (the number of that row) containing specific text as criteria. I thought that VLookUp would work, but it's not really. Ideally it's ...
1
vote
1answer
123 views

Google Sheets Customize View Using Create Custom Menu and Hiding/Showing Specifc Columns

Trying to determine a way that I can use a custom menu (.createMenu) with views that will allow me to show / hide specific columns. I need the capability to pick specific multiple columns and not ...
0
votes
1answer
82 views

Google Sheets How to Hide or Show Specific Columns using Custom Menu [duplicate]

I've figured out how to create a custom menu, but I'd like to be able to hide or show certain columns (not necessarily ranges), based on what menu item is selected. Not sure on the next steps / can't ...
3
votes
1answer
87 views

What can break the relationship between the onFormSubmit function and a spreadsheet that is attached to a google form?

I had a working Google form, Google spreadsheet, and GAS script which would be called when the form was submitted. It worked fine until the did (one?) of the following things: Cleared out the ...
2
votes
0answers
26 views

How to put a Unicode Checkmark in your Google document and export it into a pdf using a script?

I have a need to put a checkbox, checked and unchecked in my script generated Google Docs document. What would I write in the AppScript to place this in my Google Docs document?
-1
votes
1answer
281 views

Need Help With a Script to Automatically Insert Rows in a Sheet Based on Other Rows/ Data Inserted in Another Sheet

I have a sheet titled 'Raw_Data' that I insert data into every day by inserting new rows above the data from the last day. I have another sheet titled 'Overall_Formulas' that populates formulas based ...
2
votes
1answer
39 views

Best way to iterate through all input arguments?

I am writing a custom function in sheets that will not have a defined number or format of arguments. As an example, the call might be: =myFunc(a1:b3,a2:a4,b1:b9,c1,d2, [might be more, might be less]) ...
1
vote
1answer
31 views

Get unique rows and their count in Spreadsheet

I have a sheet as below, | A | B | C | ------------- |abc|123|Yes| |jkl|123|No | |abc|123|Yes| |abc|567|Yes| I want to get the output like, | A | B | C |Count| ------------------- |abc|123|Yes| 2 ...
1
vote
0answers
71 views

Google Spreadsheets Loading Bug

A few days ago, I created a Google Spreadsheet and from what I remember, it was working fine. When I came back to it today, I saw that a few cells said Loading... despite all cells in the column have ...
1
vote
1answer
396 views

Send email If one cell is greater than or equal to another

For some reason this script is not working and I was wondering if someone may guide me on fixing this? In my Google Spreadsheets, I just want the value in cell A2 to send an email if it's greater ...
2
votes
0answers
20 views

Toggle named range window with a button?

I would like to know if it would be possible to toggle the different features in sheets with a script. What I am trying to do is to basically create a button that will show the Named Ranges side ...
2
votes
1answer
90 views

How do I use a negative DURATION formatted cell from Google Spreadsheets in Google Scripts?

I'm using Google Spreadsheets and I have a sheet in the following format: Start | End | Partial result | Expected | Total 08:00 | 12:00 | 04:00 | 05:00 | -01:00 14:00 | 18:00 | ...
1
vote
0answers
36 views

Sudden issue when updating a Google Sheets Addon

I have a published Google Sheets addon, only for private use (visibility=private). I have made several version updates before, but yesterday, when I tried to make a new update from script editor, I ...
2
votes
1answer
164 views

Fixing permission problems in cross-spreadsheet import when using Apps Script

I created a function in the Apps Script associated with a spreadsheet: function importNotes() { s = SpreadsheetApp.openById('spreadsheet-key').getRange('F2').getNotes(); return s; } ...
3
votes
2answers
3k views

Create a popup in Google Spreadsheet

How can I create a popup in Google Sheets using script editor? I'd like to show a popup with a personalised notification. It should start like this: function onOpen() { var ss = ...
1
vote
0answers
94 views

Is there a script to stamp & password protect a PDF on Google Drive?

I have a few PDFs on a Google Drive, I would like to watermark/stamp & password protect (to disallow editing) before I share them. Is there a solution using Google App Scripts?
2
votes
2answers
50 views

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

I need a number to be converted to a name. In B1:B1000 I have numbers. In C1:C1000 I has function name. On writing C30 got an error: invoked too many times per second ... how do I do function on range ...
2
votes
2answers
46 views

Sum all expenses of a given type given a list of expense types in a separate sheet

I use Google Sheets to keep track of my expenses. The file currently consists of: Sheet 1: "Expense Types" Sheet 2: "2015 Details". The first column of Sheet 1 contains the list of admissible ...
2
votes
1answer
761 views

Clear range of cells

I'm trying to make a script for Google Spreadsheets (which is my first time), by clearing a range of some cells. So: for example I want to clear D5:D12 but not D13 and D14, but then again I want to ...
2
votes
1answer
130 views

Import Google Contacts to Google Spreadsheet

Google notice me : You do not have permission to call getContacts (line 3) Here is my code: function importFullName(input) { var CONTACT = ...
1
vote
0answers
211 views

Google Script: setValue function on form submit

I have written the following code function myFunction(e){ var options={cc: 'x@abc.com'}; MailApp.sendEmail(e.values[2], "New SMS Blast request", "A new SMS blast request has been entered, the ...
1
vote
2answers
105 views

Google Sheets permissions

I built two separate spreadsheets in Google Drive and spreadsheet "A" has a script that when run, will copy the input data into spreadsheet "B". When I test it, it works perfectly. But I have other ...
3
votes
1answer
394 views

Send email with an attachment located in Google Drive

I want to send a PDF attachment located on Google Drive from a Sheet. Code I'm using is: function sendEmails() { var sheet = SpreadsheetApp.getActiveSheet(); var startRow = 2; // First row of ...
1
vote
1answer
149 views

Trying to send email from Google Sheets with image attachment

I'm trying to send an email from within Google Sheets and then format it via some joins to send to an address for my Blogger account. I need to attach the image file apparently as the image isn't ...
0
votes
0answers
349 views

Custom functions: Keep getting “There was an error during calculation”

I'm using two custom functions but for some time now I keep getting the following error when I load my sheet: There was an error during calculation; some formulas may not calculate successfully. ...
1
vote
1answer
149 views

Triggering timestamp on formula input

I'd like to have a timestamp which triggers its input depending on a cell containing a formula like =IF(ISBLANK(cell),"", time ), and not upon manual input. My script is the following and is working ...
2
votes
1answer
165 views

Auto Sort data in Google sheet, but by sheet not range

I have found this script from this question to auto sort a column: How can I apply a script to only one specific sheet within a spreadsheet function onEdit(){ var sh0 = ...
3
votes
1answer
188 views

Google Spreadsheet Timestamp on Edit?

I got the major part of answer on this link: Google Spreadsheet Timestamp? The code on this link is below: function onEdit() { var s = SpreadsheetApp.getActiveSheet(); if( s.getName() == "Sheet1" ...
2
votes
1answer
334 views

Importing columns across two Google Sheets in same spreadsheet

I have one spreadsheet which houses the database of my members. In the same spreadsheet, I have another sheet where I will track attendance for the events for each of these members. First issue: ...
2
votes
1answer
453 views

Trigger Script in Spreadsheet in Similar Fashion to a Link

I currently have a button on my spreadsheet (a text box image that triggers the script). Unfortunately this button doesn't work when using a tablet. Is there a way of triggering a script to run via a ...
4
votes
1answer
443 views

Custom script “invoked too many times” error

Credit: Google Spreadsheets function to find distance between cities function getDirection(city1, city2, unit) { var directions = Maps.newDirectionFinder() ...
1
vote
1answer
46 views

Script to Create Copy (Backup) of entire spreadsheet onOpen

Is it possible to write a script or is there another method of backing up a spreadsheet when opened? The reason is: I have other users opening my spreadsheets and if they completely stuff everything ...
2
votes
1answer
545 views

Script to create a new worksheet in Google Spreadsheet

I want to be able to have a button on a Google Spreadsheet. The user clicks on the button and a new worksheet is created based on a template (or blank existing worksheet). The new worksheet should ...
2
votes
2answers
1k views

How can I trace precedents in Google Sheet

In Excel we can trace precedents and dependents. Can some one help me with something similar for Google Sheets? I have got the code for dependents from http://webapps.stackexchange.com/a/50149/88163. ...
2
votes
0answers
116 views

I created a button in a panel (dialogue window), when I push the button I'd like to appear a new panel (dialogue) window

I created a button in Google Spreadsheet. When I push the button a custom window appears. In that window I have two buttons, one to close and one to see a new window. Everything goes well except the ...
2
votes
1answer
71 views

How to sort Google Sheets columns by row height

I'm working on a sheet that involves multiple columns corresponding to various data. Each column has a varying number of cells of varying heights with wrapped text. What I want to do is make the sheet ...
1
vote
1answer
156 views

How to place invisible placeholders in a Google Doc?

I'd like to put invisible placeholders in a Google Doc so that they can be found and the content changed. In HTML, this would be a <span id="name-of-placeholder">, with the item findable via "elem ...
3
votes
1answer
657 views

Generate a formatted Google document from spreadsheet

As the title says, I have data (Q & A grouped by subject) that I have to export to a document file. As shown above, the source data on the left should be formatted like the example on the right ...
5
votes
2answers
1k views

How to limit the length of data in a cell in Google Sheets?

Is it possible to put a limit to the length of cell content while entering data into a cell using Google Apps Script or any other way?
1
vote
1answer
164 views

Create a function to copy range (values only) to a new tab at specified intervals

Looking to find a function that can copy the values only from a range I am importing from the web at a certain time. Have found a lot of functions that are similar to what I need but can't nail one ...
2
votes
1answer
208 views

Using Google Apps Script to set cursor to Headers in Google Docs

I am trying to create a Google Apps Script that could help navigate through the headers. I have currently a code searching the position with the function "findText" that I used in a custom menu in my ...
1
vote
1answer
67 views

Google sheets: conditionally change sign of decimal value in cell for each row

Here's a preview of the spreadsheet I'm editing in Google Drive: The transaction type cell has a value of "debit" if the row is for an expense, and "credit" if it is income. I would like a script ...
1
vote
1answer
88 views

Mail merge, send as an Alias

I was working with a Google spreadsheet with a script associated with it to do mail merge via Google Apps for Education. The spreadsheet works fine, although my user wanted to be able to send from her ...