Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

Filter by
Sorted by
Tagged with
0 votes
1 answer
82 views

Copy data to new column in Google Sheets

I have a sheet with IMPORTHTML that I want to copy data from one column to a new column daily. function saveData() { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet....
0 votes
3 answers
280 views

How to analyze a time tracking sheet with Google Sheets?

I have a simple time tracking set up with Tasker on my phone that creates a new line every time I connect to my work Wifi. I upload this csv file regularly to Google Drive and import it to a Google ...
1 vote
0 answers
30 views

How to Get Data from Multiple Cells and Combine into a Comment in another cell

I have a spreadsheet of orders (rows) that has room for 70 products (columns). I would like for a script to find every cell that has a value (0's are blank) and then write that value (this is the qty ...
3 votes
1 answer
2k views

Run a script when a sheet/tab is added to a Google spreadsheet

As it says in the title, I want to trigger a script to run when the user adds a new sheet or tab to the spreadsheet. I also include using the "Duplicate" function. How do I achieve this?
2 votes
1 answer
1k views

How to make a copy and remove all protected ranges from the copied sheet

What I want to do is Make a copy of the sheet and remove all protected ranges from copied sheet. var ss = SpreadsheetApp.getActiveSpreadsheet(); var timezone = "GMT-5" var timeformat = "yyyy-MM-dd" ...
2 votes
1 answer
4k views

Redirect link to another Google drive video

Is there a way to redirect a link to another video in Google Drive when both are made shareable? I ask this because I have shared someone a link to an older video and I want them to access the new ...
4 votes
1 answer
8k 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 ...
0 votes
2 answers
2k views

Jump to next empty cell in specific column

I'm writing a script where I need to take in a number attached to a name and team, process it as # of Rolls essentially, and then paste the results one by one into a running log. Each team will have ...
1 vote
1 answer
3k views

How to trigger a script when a new text value is added to specific column?

I've built a sheet that generates messages for clients based on certain input data. The message appears in a cell in column B when all the required data has been entered. When a new text value is ...
1 vote
1 answer
2k views

copyTo is failing to copy data

I have a pretty simple problem that is for some reason killing me. I have the following script which should just autofill a formula down column O, then copy the values to column P (excuse my amateur ...
1 vote
1 answer
5k views

Use Google Forms to allow updating of old data and linking to correct record

I organise a small holiday programme which requires quite a bit of information about the children who attend (to ensure they are safe). This information splits into two types: Information that never ...
7 votes
1 answer
33k views

Automatically "Allow Access" for IMPORTRANGEs in Google Sheets?

I have a set of Google Spreadsheets I want to reproduce (not share) for several users. These users are not going to be able to figure out how to Allow Access (for example, some of the IMPORTRANGEs are ...
1 vote
0 answers
219 views

Horizontal Scrolling Loop Macro for Google Sheets

I am looking to see if it’s possible to have a macro that would scroll a Google sheet to the end at a certain speed, and then once at the end, jump to the beginning and begin again. We are trying to ...
-1 votes
1 answer
906 views

Unprotect ranges [duplicate]

I am trying to create a script to protect my formulas in sheets that co-workers will use. I have 10 workbooks with 26 sheets each, all are virtually identical as far as the the locations of the ...
0 votes
1 answer
3k views

Google script app delay without freezing spreadsheet calculation

How can I have delay on Google Script App function without freezing the spreadsheet calculation. sleep function freezing all spreadsheet calculation, and I have many calculation on the spreadsheet ...
1 vote
1 answer
5k views

How to make Google Sheets jump to closest date to today when opened?

I have a Google sheet containing a list of events, with event dates listed in one column. I'd like to have my Google Sheets spreadsheet jump to the closest date to today's date on opening (i.e., ...
0 votes
1 answer
5k 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 ...
0 votes
0 answers
59 views

Is there a way to just pull out all of a certain index without going through the results and rebuilding a 2nd temp array?

I've got multiple sheets with anywhere from 500 - 10,000 rows each that I need to find specific values in a given column. Ex. Sheet A, B, C have information about a bunch of products. I search for ...
5 votes
6 answers
13k views

Split, reorder, concat inline

I want to split a cell, reorder the pieces and recombine. For example: | name | reordered name | | Page,Larry | Larry Page | | Brin,Sergey | Sergey Brin | I know that =SPLIT(A2, ",") ...
0 votes
2 answers
1k views

onEdit stops working when other function is run

I'm working on a script to help with a spreadsheet we use at work, but I'm having an annoying bug with the onEdit() function. After running the script from the script editor, it operates as intended (...
4 votes
4 answers
5k views

Return name of range as string in Google Sheets

I have a range named apple in Google Sheets. I thought a method like getRangeName("apple") would exist. I want to get the names of many ranges and set them as the header for the columns of a new sheet....
7 votes
3 answers
16k 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
1 answer
109 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 ...
4 votes
1 answer
8k views

Show all hidden rows and columns when I open a Google Spreadsheet

I want to un-hide all the hidden rows and columns when I open the spreadsheet. How can I do that for all sheets?
1 vote
1 answer
3k views

How to pass multidimensional array to a custom function in Spreadsheets

I want to pass a multidimensional array to a custom function. I do it like this: =customFunction({{"a1v1"; "a1v2"};{"a2v1"; "a2v2"; "a2v3"};{"a3v1"}}) However, I don't get the expected behavior ...
0 votes
1 answer
4k views

Send email when theres a change in a particular column on a particular sheet

I want an email to be sent when a cell is changed from "No" to "Yes" in column C from a particular sheet - sheet1. The email body would need to include information from cells in columns D,E,F,G,H,I,...
1 vote
1 answer
708 views

How to fill out an Apps Script OAuth Client Verification form - Link to Privacy Policy

In order to avoid a warning that your Apps Script code is "Unsafe" and not verified, you need to fill out an Apps Script OAuth Client Verification form. Link to Application Form: OAuth Developer ...
1 vote
0 answers
882 views

Google Apps Script - how to hide run message

I have a question about running apps script on a Google Sheet. I have a few scripts written that can apply a filter and remove a filter. When I run the script from the button on the spreadsheet the ...
2 votes
2 answers
8k views

Google sheet group column data and display values in row

I have a Google sheet with values like: Column 1 Column 2 ----------|-------------- A 256 A 271 B 270 C 262 A 266 C 258 D 257 ...
1 vote
2 answers
1k views

Auto-create/name new Google spreadsheets for names in column list [closed]

How do I auto-create multiple spreadsheets from a list of names contained in separate rows in a 'master/template' spreadsheet (up to 50 names, if possible)? I think I am looking for a script/code/...
-1 votes
1 answer
60 views

One time check to see if document is shared with a specific user

I'm trying to figure out how to write an Apps Script that checks "IF" a Google Drive URL is shared with a specific user. I do not want this to be a continuous check, just a "one time check". Example ...
0 votes
1 answer
124 views

Timestamp for Edits Made to 1 Cell Only

I have this script that works perfectly for any edit on the spreadsheet page: function onEdit(e) { if (!e.value) return; e.source.getActiveSheet() .getRange('F29') .setValue(new ...
1 vote
2 answers
615 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 ...
0 votes
1 answer
438 views

Google Script - createFolder() issue

I am running into a weird problem where the createFolder function just freezes. I get no error no failure and its just stuck there. I have it running on another sheet with no issue but in this ...
1 vote
1 answer
2k views

Add my scripts or add-ons to new Google doc

I've created a script or add on for my Google Document. The script exports the content to basic HTML. When I create a new doc I can't find a way to import the scripts from the existing document. From ...
0 votes
2 answers
53 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?
3 votes
1 answer
4k views

Using Google Apps Script add-on without publishing

I've just written my first Apps Script add-on for showing some links in a sidebar of a Docs document. It looks like the way I created it made it bound to a specific document (the one from which I ...
-1 votes
2 answers
218 views

Google script insecure?

For a couple of years a script is run in https://script.google.com, but now it is seen as an insecure app? Why? The service is provided by Google right? Third party?
2 votes
1 answer
270 views

Truncate Text returned from indexhtml

I'm new to making spreadsheets. I'm making one for a game I play. I'm trying to use an api call to return json data from the games exchange website, to update prices in near real time. However I don't ...
2 votes
1 answer
5k views

How to update row in Spreadsheet based on respective cell value?

I'm about 10 days new to coding in GScripts/Spreadsheets and I've been struggling to write a Spreadsheet function that will change the values of certain cells in certain rows depending on the value of ...
2 votes
2 answers
3k views

How do I delete multiple recurring events from Google Calendar?

To delete multiple events, I used the script in this answer - How to delete all events on many dates all at once but not the whole Calendar in Google Calendar? var fromDate = new Date(2013,0,1,0,0,0)...
0 votes
2 answers
2k views

Convert the data from comma-separated cells into repeated rows

I have a Google Spreadsheet where the first column is multi-valued (not all rows though) and also a few other columns. Not all columns are multi-valued. The values are separated by ',' Here is an ...
1 vote
1 answer
34 views

Custom highlighting style on Google Spreadsheet

I am new to Google spreadsheet and I'm wondering if there are any other ways to draw attention to a box rather than just change its colour. I want to emphasize a box drawing a circle on it. I saw ...
0 votes
1 answer
4k views

Google App Script TypeError Cannot Call Method getSheets of null

Wondering if anyone can assist in debugging this Google app script. The script works as needed to create CSV files of each Sheet in my workbook, but it throws an error every time: "TypeError: ...
2 votes
1 answer
863 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
1 answer
12k 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; } Note ...
1 vote
2 answers
2k 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 ...
0 votes
1 answer
9k views

How to manipulate text strings in Google Apps Scripts

I've found this super userful code that I have managed to add to a Google Sheet (total newbie here) but I have a couple of problems. The first is to disregard blanks. I want to select a list, get ...
3 votes
1 answer
2k 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 ...
0 votes
1 answer
6k views

Use the script to export values with offset by one column

I would like to use the exportRange Function and set the target to off center by one column. How can I accomplish this? function exportRange() { var import = SpreadsheetApp.openById('...

1
25 26
27
28 29
37