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
967 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
235 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
213 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
917 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
712 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
441 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
714 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
2k 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.
0
votes
0answers
472 views

How to use Google Scripts w/ spreadsheet and jotform to auto sort so the newest entry is always listed on the top row?

I'm trying to setup a form and spreadsheet database to track inventory on a daily basis at a remote location. The idea is that the person at the remote location can update our stock via a simple ...
1
vote
1answer
148 views

Creating multiple instances of a cell value in Google Spreadsheet

I have a Google Spreadsheet with the following data: A B ----------------------------- 1 | Number of responses | Value 2 | 1 1 3 | 3 ...
1
vote
0answers
416 views

Set a Category Filter in a Google Spreadsheet Line Graph

I've got a google spreadsheet that tracks status updates to a series of projects over time. The table rows each list a particular month (01/2012) and the columns list the status change ("Ready for ...
0
votes
0answers
150 views

Download list of contact information and check if Google Account

I'm looking for a way I could: retrieve a list of all my contacts and their email's and In order to retrieve a list of all of my contacts into a Google spreadsheet, I exported them as a Google CSV ...
0
votes
1answer
214 views

Google spreadsheet multiple auto-sorting

In a Google Spreadsheet I have different group of cells to auto-sort ascending i.e. table range a3:c16 columntosortby = 2 table range d18:f31 columntosortby = 5 table range g33:i46 columntosortby = ...
3
votes
3answers
3k views

Google Spreadsheets: how to specify entire sheet as range?

The best workaround I have found so far is: worksheet_name!$A$1:$YY but ideally I would like to be able to simply write, e.g.: worksheet_name! So, does anyone know: is there a syntax for ...
1
vote
2answers
575 views

How to share Company's directory with all users using Google Apps shared Directory?

I am using the code given in the answer to this question: Is it possible to pull my Company directory into Google sites intranet? However, as it specifies, it works for admin only. Would it be ...
3
votes
1answer
527 views

Looping through the range of cells to test the dates

I am trying to create a function to check the dates in 'Dt' sheet and return Match or Not Match. It works fine with when I display my answer in MsgBox, but when I try to do it in one of the ...
3
votes
1answer
293 views

How to report which checkboxes were left unchecked on a Google Forms submission?

I have a Google form that stores its responses in a Google spreadsheet. It's set up so that whenever someone submits the form, I receive an email report of the responses. There are many places in the ...
3
votes
2answers
1k views

Iterated variable (i) for argument on range in Google Scripts API

for (i=0; i<numItems; i++) { var cell = sheet.getRange(12,i); cell.setFormula(i); } This simple formula should go to every place on the column 12 where there is data, and replace it ...
4
votes
1answer
1k views

Google Spreadsheet Sort Two Columns

So I've found the following answer in regards to auto-sorting by one column, which works great How can I make some data on a Google Spreadsheet auto-sorting? However, my use case requires the sorting ...
2
votes
1answer
2k views

How do I Sum Thoughout Different Sheets

How do I create a reference to a defined interval in several sheets? Something like this: =SUM(Sheet1:Sheet2!A1)
2
votes
1answer
219 views

Repeat range under each other in Google Spreadsheets

I have a range of two columns with year and dates. In another sheet I want to repeat this range for X amount of times under each other. How can I do this? So for example I have this range: Year | ...
0
votes
0answers
157 views

Create new document within spreadsheet and link

I would like to create a spreadsheet script that allows me to create a new document every time I click on a new cell or row and then have that document links back to that cell.
2
votes
1answer
324 views

Enabling script to run as author in a shared Google spreadsheet

I created a spreadsheet that I'd like to share with anyone with the URL. The sheet contains several app script functions. These functions both change the content of the sheet and copy data to ...
1
vote
1answer
6k views

How do I automatically update a cell in Google Spreadsheets to the most recently entered in the same row?

I am trying to have one column that will show the most recent thing i entered in the row. Example: I want B2 to be the same as D2 but once I enter something in E2 I want B2 to display that. And then ...
1
vote
2answers
448 views

Why Gmail Meter is not working

I added Gmail Meter to my Gmail account but it never reported anything. Do you know what could be the matter? I worked to authorize and add the script, then I waited and nothing happened. When I go ...
0
votes
1answer
2k views

How do I get an onEdit script to run on a Google Spreadsheet for all users

I created an onEdit script which re-sorts a Google Spreadsheet every time a cell is edited. The Google Spreadsheet is shared amongst multiple users and I'd like the script to run for all users, every ...
3
votes
0answers
871 views

Google Spreadsheets: add unique QR code field to a spreadsheet based on a form in google docs using Script Trigger

At the end of each row filled in, using a custom Google Form, I'm adding three more columns: Date of creation Unique ID QR code (it is a list of computers) Unique ID and QR code are unique. QR ...
0
votes
1answer
354 views

How to read a multiple values in cell in each row (separated by comma) in a Google Spreadsheet

I have problem in reading cell with multiple values and comparing the each value with column from a-z if match found then set value of the cell has '1'. Problem: I need to take multiple company names ...
0
votes
2answers
1k views

how do I get named ranges in Google Spreadsheets to be more reliable/current?

I'd like to pull values from a named range into a calculation. I have this function: function getNamedRange(n){ SpreadsheetApp.getActiveSpreadsheet().getRangeByName(n); } Seems pretty simple. I ...
1
vote
1answer
1k views

How can I apply a script to only one specific sheet within a spreadsheet

I have a spreadsheet with two sheets called Robin and Lucy. I've made/found/mangled a script to sort the data on the sheet each time I add some data to column A function onEdit(event){ var sheet = ...
8
votes
3answers
17k views

How do I mail merge from Google Spreadsheet to a Google Document?

With Microsoft Excel and Microsoft Word, it is easy to merge rows from a spreadsheet into pages in a Word file. This was traditionally used to make paper mailings. How can I do the same with Google ...
3
votes
2answers
4k views

More Efficient Filtering Script

I'm exactly one day into writing Google scripts. I've managed to write one that will filter data in a spreadsheet with 24 columns and, for now, about 900 rows. The problem is, it's slow. Any ...
3
votes
1answer
1k views

How to re-use Google Apps Scripts in new Google Spreadsheet

I'm having an issue. Whenever I create a new spreadsheet, I'm not able to add a script I've already created. The list for recent projects or scripts is always blank. Anyone have a resolution or do I ...
2
votes
3answers
5k views

Google Scripts : How to distinguish Empty cells from Zero

I want to count a number of specific responses from a form where the response can be left empty, zero or any other number 'd'. The following code: var data = sheet.getRange("B2:L").getValues(); ...
3
votes
3answers
3k views

How can I make some data Autosort in a spreadsheet on edit?

I am working with a simple spreadsheet that has name/lastnames in it. I need for the spreadsheet to automatically sort the entry alphabetically by the last name (column B). I have used the following ...
9
votes
2answers
2k views

Cumulative Sum without Script

For this question, I've created a Google Apps Script function, that calculates the cumulative sum of a range. Martin Hawksey on Google+ made a comment about a more efficient way of calculating the ...
2
votes
1answer
1k views

How do you add a custom font size in Google Spreadsheets?

How do I add a custom font size for a Google Spreadsheet I have? There are some defaults like 14pt, 18pt, 24pt and 36pt, but I would like to have a font size like 30pt, is it possible?
3
votes
1answer
234 views

Google Spreadsheet text cell formatting question

I'm trying to create some sort of automated formatting for certain columns (except headers of course.) to take a string of numbers (and previous formatting; which should be stripped.) and format it as ...
4
votes
1answer
2k views

Creating a function that runs when a Google spreadsheet is opened

I want to create a function which runs automatically when the spreadsheet is opened. This function will make the selected cell the last cell without text in a certain column. Basically, I don't want ...
6
votes
3answers
777 views

Sorting data in Google Spreadsheet by cell entry

I have a Google Spreadsheet that lists various events. Students have entered their name next to events that they would like to sign up for. It looks like this: Each student may sign up for more ...
2
votes
2answers
2k views

Is it possible to pull my Company directory into Google sites intranet?

We use Google apps for enterprise, and I want to build an intranet, based on the Google sites intranet template In the Directory area, I want that the list will be updated from my contact/company ...
4
votes
1answer
4k views

Auto create and name new sheet in Google Spreadsheet

How can I automatically create and name new sheets in a google spreadsheet from a list of names, such as a student roll sheet? I would like each new sheet to be created when I add corresponding names ...
4
votes
2answers
689 views

How can I dynamically format the diagonal cells in Google Spreadsheet?

I want all of the diagonal cells (A1, B2, C3, D4, E5, etc) of a Sheet to be formatted as Black Background, White Foreground. Is there any way to do this for a Sheet that constantly increases in size? ...
4
votes
3answers
15k views

How can I automatically set “last updated” cell in row Google Docs Spreadsheets?

How can I automatically set "last updated" cell in row Google Docs Spreadsheets ? I want to create a column where the cells' value will be automatically set to when that row was last amended. Is this ...
1
vote
4answers
4k views

Force users to update password every 3 months for Google apps?

I manage a domain and I want to force all users to change their password every 3 months. Is there a way to do this?
1
vote
0answers
227 views

Google Docs: Script Project is not editable for anyone

I created a new Script Project in Google Docs with the following sharing settings: "Anyone who has the link can access. No sign-in required." - "Edit access: Allow anyone to edit (no sign-in ...
3
votes
2answers
2k views

Parsing timestamp in Google spreadsheet with script

I have a spreadsheet with a form that timestamps every time the form is submitted. I'm writing a script to change the background color of the timestamped cell if it is more than 7 minutes after a ...
6
votes
2answers
7k views

How to Refresh a cell in Google Spreadsheet?

I have a column in Google Spreadsheet that calls an outside webservice using URLFetch in a Google Script. The cell uses two parameters in that cell's row. After a change occurs where those two ...