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
11 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 = ...
0
votes
1answer
12 views

Can't pass values to custom functions as parameters [on hold]

My Google Apps Script function myFunction() { var files = DriveApp.getFiles(); while (files.hasNext()) { var file = files.next(); Logger.log(file.getName()); } } returns "You do not have ...
2
votes
1answer
19 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
31 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
0answers
30 views

Adding columns automatically to Google Sheets

I am using Zaption and Socrative as assessment tools while teaching. After I download the CSV files, I import them to Google Sheets. I figured out a way of having the results sent to a PDF after ...
4
votes
1answer
62 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
20 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
37 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 ...
1
vote
1answer
33 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. ...
0
votes
0answers
30 views

Google Spreadsheet, Google script, calculate

I want to grade my students and give them feedback. So they make an excercise, I will give them the feedback if they do it perfect or not perfect. I want also give them grades. Question: So I have ...
1
vote
0answers
17 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
28 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
26 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 ...
2
votes
0answers
41 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 ...
3
votes
2answers
47 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
24 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 ...
1
vote
0answers
19 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 ...
0
votes
0answers
22 views

Send to respondents a number between 1 and 10 using Google Forms?

My idea is to give to respondents by mail a number reference between 1 and 10. The idea works as follows: You have 10 boxes. When a response is submitted, automatically the form will send a email ...
1
vote
1answer
43 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
29 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 ...
0
votes
0answers
63 views

Gmail Auto-Response, one time only

I want to set up auto-reply emails using scripts. We're currently using Canned Responses but the emails we're responding to just changed their setup so instead of sending the reply to the sender, we ...
1
vote
0answers
20 views

How to add pictures to shared contacts in google contacts?

More specifically: is there a way to add a picture to external shared contacts in Google Apps for Enterprise, where the picture is shared amongst all members of my domain? I know it is possible to ...
3
votes
2answers
74 views

How do you subtract two time values in military format in Google Apps Scripts for a spreadsheet?

One column is labeled Checkin Time and the other is labeled Checkout Time and finally I have a column that is labeled Total Time Worked. The cells in the Total Time worked column should subtract the ...
1
vote
0answers
28 views

Jagged array from Google Spreadsheet range

The range in my Google Spreadsheet looks like this: | A | B | C | D | E | F | ...
0
votes
0answers
30 views

how can i delete and erase all contacts that not delivered my email to them?

Many of my friends in the span of 15 years , changed their emails to new ones in Yahoo or Gmail. Those mailboxes are disabled by Yahoo or Gmail. When I send email to everyone via the group (my group ...
1
vote
0answers
19 views

How to get the Position of a paragraph in google docs API

Using GAS, I'm trying to navigate paragraphs in a google doc and record their starting position so that I can display an interactive navigation menu in a sidebar. But I can't find any GAS method that ...
0
votes
1answer
27 views

How do I put the timestamp in the “check in” or “check out” column based on the user's response in the Google form?

I created a Google form that allows users to clock in/out. The form asks two questions, their pin number and whether they want to check in or out. When the user clicks on "check in" and submits, the ...
0
votes
0answers
39 views

Google Spreadsheet Script: insert text at end of list

I'm trying to add a custom menu that inserts a date in whatever cell is selected, appending it if anything is there already. It works fine, if slowly. The goal is that, at the end, I've got a list of ...
0
votes
0answers
36 views

Unable to import pricing info from toysrus.com into a Google Spreadsheet

I'm trying to pull live pricing from a given toysrus.com item into a Google Spreadsheet (one item/price per row), and am having no luck whatsoever. Importxml(url, xpath) does not work (similar to the ...
0
votes
1answer
53 views

Add timestamp to two different columns in Google Spreadsheets

Need help in adding another function using the below script. I would like to have a timestamp "start" and "end" on two different columns, whenever the other two separate columns are edited. Based on ...
0
votes
0answers
37 views

Timestamp in Google spreadsheet [duplicate]

Any idea on how to work 2 timestamp which is start and end into google spreadsheet? I have already this in my script editor, but it’s only for start. I want to get also the end and show into another ...
0
votes
0answers
76 views

Unique ID Column

I have a Google Spreadsheet that I want to have a unique number created in column A when I enter information in column B. Below is the formula I currently have that works, but I am wondering if there ...
2
votes
1answer
63 views

How do I loop a script through all pages but the first one?

I'm very new to all this. I'm trying to write a script that sorts sheets by descending date order each time a new row is entered. I need the script to run on all pages but the first (the summary ...
0
votes
0answers
26 views

Automatically creating sheets across different google spreadsheets

I have one spreadsheet that collects the Google form data that is submitted. I then created spreadsheets titled "A-D", "E-H", "I-L", and so on to create the alphabet. I would like students to use ...
0
votes
0answers
34 views

Automatically create google spreadsheets from master list

I am trying to create new sheets automatically based on a list of items. I came across your answer to a question here , but the example sheet it points to is no longer valid. I am working with this ...
0
votes
1answer
57 views

Linking a URL to text using google script in spreadsheet

I have a URL ready to be followed. I am sending an email using Google script, and in this email I need this link to be there... but I do not want it to be: ...
1
vote
3answers
62 views

Conversion from object to string in google scripts

I'm trying to take information from Google Sheets and use it to send an email with the information given in sheets. I have the email part down, but when i try to editAsText to delete unwanted ...
1
vote
0answers
37 views

function to verify all cells in active row

I have a function which is triggered onEdit to enter an ID in new table entries: function IdGenerator(e) { // Get the active sheet var sheet = SpreadsheetApp.getActiveSheet(); // Get the ...
1
vote
1answer
61 views

How do I get a weekday 12 weeks ago using in a Google script?

I'm having the following formula: =TODAY()-WEEKDAY(TODAY(),3)-84 and this gives me Monday, 12 weeks ago. I'm working on this code, but it gives me only a certain days back var twelweWeekAgo = new ...
0
votes
0answers
24 views

Freezing formula values in Google Spreadsheets

I have a spreadsheet that will receive new values pulled from an email via Apps Script once a day. I'd like to be able to "log" certain values over a specific length by loading them into a new cell ...
0
votes
1answer
28 views

Transferring a custom add-on to another Google form

I created an add-on for a Google Form: After saving it, I can see it in the add-on list: How can I use this add-on in another Google Form?
1
vote
1answer
123 views

Auto increment ID in Google Forms

I am designing a Google Form for managing a congress registration process. I need to have a unique ID number for each registration and I found an answear here: Can I add an autoincrement field to a ...
3
votes
1answer
51 views

Google Document Date Script

I'm using a script that was posted here on Web Applications: Add Date to Google Document. I changed the way the date is formatted to this: ddMMMyyyy I wanted to have this, with the month being ...
1
vote
0answers
9 views

Detect column D changes with Google Apps Scripts

I would like to detect if the column D rows in my spreadsheet are becoming a date (at the beginning those column rows are empty), so if D1, D2, D3 become a date their text or colors should blink. Now ...
1
vote
1answer
110 views

How do I get a date formatted as YYY-MM-DD from a cell for using in a script?

I have a problem getting a date from a cell in my Google Spreadsheet. I would like to access A3 in the sheet Dates, which holds the date 01/12/2013, and re-use that as variable start-date in the below ...
0
votes
0answers
50 views

Adding add an option to context menu in Google Drive

I'd like to be able to add an option to the context menu that appears when I right-click on a file or folder in Google Drive. I would connect this to a Google Apps script that would recursively ...
1
vote
0answers
45 views

How can I get my set values and formulas to populate to a row of values received from a Google Form?

When I receive submissions from a form I am trying to find a way to include my formulas and set values in the same row as the information submitted by form. My form is only collecting 14 values but my ...
0
votes
0answers
17 views

capture & Log Range into new sheet on a weekly basis

I'm using =IMPORTHTML to import a set of values into a spreadsheet and I would like to have those values captured and stored in a different sheet once a week. I'm not all that familiar with scripts ...
4
votes
1answer
53 views

Save daily to my Gmail in Google Sheets

Right now what I have is this in a Google sheet for my company daily lunch program: function sendLunchPerkSummery() { var d = Date(); var file = ...
1
vote
0answers
89 views

Google Apps Gmail Dual Delivery with Outlook Sync

We are in the process of migrating three email accounts from a cPanel web-hosted server to Google Apps Gmail. With this, these users exclusively use POP3 to check their email using Microsoft Outlook ...