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)

4
votes
2answers
2k views

How do I implement a script that creates a unique ID for a Google form submission?

I need to create a unique ID upon submission of a form which will be used as a project number for tracking. The number needs to be unique but not based on rows or other changeable data because ...
1
vote
1answer
506 views

Why am I getting an “Authorization needed” error in my dummy web app?

I'm trying to write a Google Apps Script web app, which will, eventually, populate a spreadsheet. However, I'm having a hard time getting started. I have an HTML file: <div> <select ...
2
votes
1answer
95 views

Geocode in Google spreadsheets, keep results

I have a form for internships and I am passing over the address of the internship provider to a function which gives me latitude and longitude for it, which is then consumed by a webmap using tabletop ...
0
votes
0answers
71 views

Google Apps Script: how to get data from another sheet from the active spreadsheet? [duplicate]

I have a spreadsheet with several sheets, like this: If I want to use the active sheet in the active spreadsheet, I use this method: var s = SpreadsheetApp.getActiveSheet(); How do I use another ...
2
votes
1answer
633 views

Making all cells in a column links from the values within the cell?

I have a column of cells in a Google Spreadsheet with values such as: 512 2123 2342 3532 What I would like to do is convert all these into a hyperlink and keep the value as the link text: ...
1
vote
2answers
575 views

GDocs: Send Email Notification Based on Timeframe and a Given Email Address From a Cell?

How specifically does the code found in this article need to be modified to allow for a specified email address column to inform who the reminder should go to? I have an example spreadsheet here with ...
6
votes
2answers
2k views

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

I'm new to Google Apps script and I would like to create a function for a spreadsheet that sums cell values when the cells meet certain criteria, such as the background color. Moreover, I'd like to ...
0
votes
0answers
86 views

Sending emails to specified end users

I'm trying to write a script to send emails from a google spreadsheet. My specifications are: Send email upon form submit Only send to email address listed on form I have written a sendEmail ...
1
vote
2answers
621 views

Google forms script to delete responses counter

I have tried and combined a few pieces of script to delete rows, but this does not reset the counter. Help resetting responses using script would be appreciated. My copy sheet function, and delete ...
5
votes
3answers
1k views

Cell reference with colour formatting

Is it possible to reference a cell in Google Spreadsheets so that cell where it gets displayed also displays it using the same text and cell colour formatting? =A1 Will only reference dell's value. ...
1
vote
1answer
152 views

Run a custom script more than 20 times in Google Spreadsheet

I need a way of running a custom script more than 20 times in my spreadsheet. I'm creating a class assessment spreadsheet that will be used as a master across my school, and it needs to retrieve the ...
3
votes
1answer
719 views

Sum a column except current cell

Is it possible to sum all values in a column EXCEPT the value in the current cell? That is, the cell that is to hold the result. With a normal SUM(E:E) command the result is #REF! with a Circular ...
1
vote
1answer
743 views

Dependent validation in Google Spreadsheets

Here's what I'd like to do. The first selection is Subject (as in a school course). There are 5 subjects. Then there are three sub-selections in drop down lists for each subject: Subject Test Type ...
0
votes
2answers
563 views

Show data from one sheet on another if date is today

I have a list of people responsible for data verification that are changing every day. The schedule is on one sheet. And data verification is on another. What I need is to show only responsible ...
1
vote
2answers
1k views

Can I copy row from one Google Spreadsheet to another based on certain criteria

I have a spreadsheet to track student loan outs: Column A is the student name Column B is how many loan outs they have received Column C is the class period Column D is the teacher name ...
2
votes
1answer
558 views

Can I map specific parts of a Google Form to one spreadsheet, and other parts to another spreadsheet?

Can I map specific parts of a Google Form to one spreadsheet, and other parts to another spreadsheet? Some of the responses on one will be public and viewable by anyone, but others will be private.
0
votes
2answers
281 views

How do I link two Google Doc spreadsheets so that entering a numerical value in one cell of Sheet 1 produces an 'x' in the same cell of Sheet 2?

I know about the importRange function to link two sheets, but I wonder if there's a way so that when a cell's contents are imported to the second sheet, the second sheet will autopopulate the ...
2
votes
1answer
166 views

Grading a Google Spreadsheet by answers given in a Google Form

I'm currently working in a school and students answered a 50 question form on ICT Ability. The results of this form have been put into a spreadsheet and I have to order the names in terms of ability. ...
1
vote
1answer
2k views

Auto populate data in Google Spreadsheet from data in separate spreadsheet?

So, I'm in the situation where I have a Google Spreadsheet with people's names, phone numbers, addresses, etc. Is it possible to, from another spreadsheet (not sheet, different workbook), search the ...
1
vote
1answer
1k views

Copy and Paste Cell Contents Once a Week

As per the title, I want to "move" the contents of a cell one column to the right once a week, specifically Sunday at 11pm Must I use a script for that?
2
votes
3answers
661 views

Split, reorder, concat inline in Google Spreadsheets

I want to split a cell, reorder the pieces and recombine. How do I do that inline. For example: | name | reordered name | | Page,Larry | Larry Page | | Brin,Sergey | Sergey Brin | ...
2
votes
1answer
1k views

Panel with Vertical Scroll Bar that allows navigating to different worksheets

I am attempting to build a Script that would open a window with each worksheet I have in my spreadsheet, allowing me to click on the worksheet name to navigate to that sheet. I found the following ...
1
vote
1answer
145 views

How can I speed up my Google Spreadsheet Script?

I am somewhat new to JavaScript and very new to using it in Google Spreadsheets. I have read that fewer calls to Google Spreadsheet API speeds things up, but I feel like I have as few as possible at ...
6
votes
1answer
2k views

Colorize a cell in Google Spreadsheets based on cell data

I'd like to colorize a cell based on it's contents. 0 = red, 100 = green, and linearly interpolated between. function LinInt(x){ var ss = SpreadsheetApp.getActiveSheet(); var cell = ...
1
vote
1answer
774 views

Data Ranges in Custom Google Spreadsheets Function

I'm trying to create a custom Function in Google Spreadsheets that takes a range as input parameter. function Example(cells){ var values = ...
0
votes
1answer
1k views

Auto date added to adjacent cells when data is entered

I am trying to create a spreadsheet to track student loan outs that will automatically put the date in an adjacent cell. The spreadsheet would be set up like this: Column 1 would be "name" Column 2 ...
1
vote
1answer
228 views

Duplicate check while creating Google Contact with Google Apps Script

I have the following code which creates Google Contacts from a Spreadsheet. The problem is whenever I run the code it creates contacts but has no functionality to check if the same Google Contact ...
2
votes
1answer
416 views

Automatically create a new row each day, on top of older rows

I am looking for a way to automatically create a new row on top of older rows each day. Inside of this row should be the current date.
1
vote
0answers
419 views

Google Docs Forms: Create Checklist Item with adjacent Textfield

Using Google Docs Forms, I'd like to create a checklist with a "quantity" and "comments" textfield adjacent to each checklist item. Is it possible to do this without writing a custom script?
4
votes
1answer
312 views

Pull Twitter Posts into Google Spreadsheets

I would like to set-up a Google Spreadsheet that automatically pulls Twitter search results into the cells. For instance, I'd like to search for "pizza" near "baltimore" and then have any pizza ...
1
vote
1answer
434 views

Changing an onEdit function to run onOpen

I have the function below (found online and adapted and it works) that is an on-edit function, but I want it to run/trigger when an import is done OR on open, as the data will not really be edited it ...
2
votes
1answer
558 views

In Google Spreadsheet, finding what formulas reference a given value

I would like to find out which cells have formula dependencies in a large spreadsheet. I am looking for a way to do something like OpenOffice Tools>Detective>Trace dependents and Edit>Find ...
1
vote
0answers
310 views

Google Apps Script: copy document comments?

I'm working on the following script, which is supposed to look at the current document, grab its comments, make a copy, and copy the comments to the new document. However, I seem stuck. I'm not ...
3
votes
2answers
992 views

How to avoid “invoked too many times per second” error

I made a Google Apps Script, but often I get this error: Script invoked too many times per second in this Google user account. This is the script: function papersControl(tipo, col, prev_cell, ...
2
votes
1answer
547 views

How to automatically open a created text document after it being created

I've used this script to create a Google Document (like word document) with Google Spreadsheet. But, when I do so, the new text document created from a template is placed in the default chosen folder. ...
2
votes
3answers
6k views

How to automatically insert a new row and retain functions/formulas from last row?

I have a table with cells that have functions/formulas, like this one: I need a script that creates a new row, copying with it the functions/formulas of the last used row. I find this script which ...
1
vote
1answer
395 views

Create New Google Spreadsheet with timestamp

I'm trying to create a new spreadsheet once we select the specific function from the custom menu item that's selected. I want the new spreadsheet to be "Sheet" & "Timestamp". Can anyone point me ...
3
votes
1answer
122 views

How can I take the HTML/data from a Google Document and restyle it with CSS?

I have a list in a Google Document that I would like to restlye with CSS. Unfortunately Google Docs no longer allows using CSS/HTML styling within the app itself. What would I need to do to get ...
1
vote
0answers
73 views

Auto paste formula on form submission

I have searched and tried various solutions elsewhere but none seems to work for both conditions. I would like to have the formula: =IF($A2="Elementary", VLOOKUP($B2,'ELEM PRINCIPAL'!$B:$AA,7,false), ...
1
vote
1answer
110 views

Inserting rows and adding a cell reference

I'm trying to automate adding new rows if I'm on the last few rows of my sheet. It works, but since I'm also adding a cell reference to it, and checking the amount of free rows left using ...
1
vote
1answer
782 views

Google Spreadsheets - how to add carriage returns to CSV downloads

In reference to this question: Google Spreadsheet downloaded as CSV comes out on 1 line? Is there anyway to have a downloaded Google Spreadsheet incorporate carriage returns and linefeeds such as if ...
1
vote
2answers
209 views

Is there a way to speed up the auto-increment routine in Google Spreadsheets?

The solutions that have been provided for this question does the job, but when more people submit data at the same time, things go wrong. The same number is used in multiple rows. Is there a way to ...
1
vote
2answers
3k views

Using Macros in Google Documents - is it possible?

I want to be able to have some macros, while writing in a Google Document. The idea is to replace the Quick Parts in Word - so I can have the same functionality in a Google Document. Any ideas?
2
votes
1answer
2k views

Google Script for pulling gmail addresses into a spreadsheet

This Google Script goes through and finds the emails in my gmail which are in a label called "LabelToGet" and send me a link to the spreadsheet created with these emails. It works well, but I have ...
0
votes
1answer
194 views

Creating a class roster in Google Spreadsheets from a split result

A lecturer from the European School of Physiotherapy in Amsterdam stumbled on a particular script I prepared, hoping it would resolve a problem he had. After having had a little chit chat, it turned ...
3
votes
1answer
794 views

Why would this Google Spreadsheet onEdit script be so slow (2 secs to change cells, 3 secs to update)

I've put together a script for a spreadsheet based on what I have seen here and other sources that should provide a simple username and timestamp function. I have another spreadsheet that uses a very ...
1
vote
0answers
623 views

Google Apps Script UrlFetchApp and password protected pages

I'd like to be able to use Google Spreadsheets to login to my registart and automatically list into rows the current name server and email settings of all my sites, rather than use the heinously ...
0
votes
1answer
382 views

Google Spreadsheet Timestamp for columns B & D?

Found this script on one of the questions answered in the forum what I don't know enough to make it work. I would like it to time-stamp date and time in column B when they check in and then a separate ...
2
votes
1answer
599 views

If cell equals a value then move row to different Google Spreadsheet

I've got a script that sorts a Google Spreadsheet when a value in a column is changed. I'd like to add to the script the following functionality: If the value for column E = "Complete" then the ...
5
votes
2answers
1k views

Can I use other font weights in Google Documents?

How can I use other font weights (such as Book 300 for Open Sans) in my documents? Adding Open Sans only allows me to use Normal 400, for example.