Questions tagged [google-apps-script]
Use for questions about Google Apps Script, Google's JavaScript-based cloud scripting platform for automating tasks across Google products and third-party services. Use in addition to relevant product-specific (e.g. [google-sheets], [google-docs]) or API-specific (e.g. [google-drive-api]) tags where applicable
40,204
questions
0
votes
0answers
6 views
set a range, then concate range to a single cell on another sheet with a row above each consolidated cell
I'm trying to take the range of A5-A(last row), then on another sheet make a ##note row, and insert the concrete cell of each row below it. after the new rows have been combined and set in the second ...
0
votes
0answers
7 views
compare two arrays and delete data that is not in other array
I am new to the Apps script and trying to compare two email lists,
emails from google contacts
and emails from a google sheet (column B),
I want to delete email/s from Google Contacts that are not ...
1
vote
0answers
4 views
How to automatically copy all events from one calendar to another with GAS?
It appears I'm missing something fairly obvious in trying to automatically copy all events from one google calendar to another. Others don't want access to the source calendar, so it goes.
Below what ...
0
votes
0answers
7 views
TypeError: Cannot read property 'parameter' of undefined
Disclaimer: I am not knowledgeable about Google Script, so detailed explanations of the issue would be much appreciated
My goal is to reproduce the steps from this page:
https://www.labnol.org/send-...
0
votes
0answers
7 views
Unwanted event blocks from the same onFormSubmit Trigger
I am having the same problem reported elsewhere (How can I be getting multiple unwanted event blocks from the same onFormSubmit Trigger?) but with a twist. Where other unwanted triggers leave out ...
0
votes
0answers
8 views
Import/Export to csv or xlsx Google Sheet
Is it possible, and if so how, to export from Google Sheet using a function to XLSX.
I need to be able to specify which columns get exported, the name of the sheet they get exported to and which ...
0
votes
0answers
9 views
Google App Script: Refreshing Addons with Triggers
I have created an add-on for Google Sheets.
var ss = SpreadsheetApp.getActive();
ScriptApp.newTrigger('checksheetchange')
.forSpreadsheet(ss)
.onChange()
.create()
function checksheetchange(){
...
0
votes
2answers
20 views
Hide or Show multiple columns in one command
I am currently running the following to hide columns depending on the value of a specific cell. It works, but I'm wondering if there's a more efficient way to achieve this? I notice there is 2 ...
0
votes
1answer
11 views
Merge data from specific range of all sheets in a folder to a master sheet
Do I have script that I am trying to get a specific range (single row ie AB2:AB10) from each sheet in a folder (getfolderbyid("jkhkkkkkkk") to copy to a specific master sheet getsheetbyID(&...
0
votes
0answers
9 views
Uploading video to YouTube using Java Script or Apps Script
I have a video which I want to upload it to YouTube using Java Script or Apps Script. I know that I will need a blob URL to do that I have that too. I just want to know how to upload Videos using ...
1
vote
0answers
14 views
A challenge: put a RESPONSIVE Web App Form made with GAS into a HTML Page
I ask you for help because I have had a problem for some time that I cannot solve.
I have a simple form built through a web app and need to embed this form into a web page via an IFRAME.
I can do this,...
0
votes
1answer
21 views
Change format of a range of columns rather than one at a time
I have a function that takes the format of a cell and applies it to another cell. The code I'm using is:
var backColor1 = sheet.getRange("Config!C30");
var cbgColors = backColor1....
0
votes
1answer
24 views
Automatically create a new sheet with data of a row in the mastersheet
Consider I have a mastersheet with names in column A and a link in colum B, starting in row 2.
The code below, for a reason I don't understand, creates only one new sheet with the name in row 2, and ...
1
vote
1answer
23 views
Protect specified range in google Sheet with GAS
function Lock(){
var sh = SpreadsheetApp.openById(ssID).getSheetByName('6');
var protection = sh.protect().setDescription('BVDATA');
var me = Session.getEffectiveUser();
protection.addEditor(me)...
-1
votes
1answer
26 views
Datetime seems to break Google Apps Script client-side deserialization
I've uncovered an odd bug with Google Apps Script's web interface that it can't seem to transport datetime values from the server side to the client.
// Code.gs
function fetchData(){
var ...
0
votes
1answer
32 views
Protect specified cell in google Sheet with GAS
I have this :
var sh = SpreadsheetApp.openById(ssID).getSheetByName('Sheet0');
var protection = sh.protect().setDescription('BVDATA');
var me = Session.getEffectiveUser();
protection....
0
votes
1answer
15 views
Creating and Overwriting Google Sheets Table
I'm trying to create/remove/re-create a table with information pulled from Google's AdminDirectory service and have the ability to overwrite that information with different groups of users using a ...
0
votes
0answers
22 views
How to get the current number of cells in a sheet using Google AppsScript?
Is there a tool to get the current number of cells in a sheet using Google AppsScript? By "number of cells", I am referring to the 5-million number-of-cell limits per sheet in Google Sheet. ...
0
votes
1answer
21 views
Placing a timestamp on a cell accross multiple sheets on edit
I tried many different variations of this script and can't figure out why it's not working.
I want to update the same cell "J3" with a timestamp across multiple tabs onedit. I have another ...
0
votes
1answer
21 views
How to add additional content to htmloutput in Google Sheets with Google Apps Script
I found the code that creates pop-up using HTML output. It is currently set to show one item: a title that hyperlinks to a website in a new tab. I am interested in adding additional content to this ...
0
votes
1answer
23 views
List file names during run time from App script HTML
I have created an app script to get list of all files available in Gdrive. While executing I m unable to pass the file names which are generated during the execution to tag.
My goal is to list the ...
0
votes
1answer
30 views
Exporting data to another spreadsheet based on 2 checkbox criteria
I've been trying to figure this out for a while and my friend told me to ask over here! For some context, I have multiple projects where we track each invoice our sub-contractors send. Each project ...
-1
votes
0answers
17 views
Excel VBA code to be converted to google scripts
Hi Im having a problem converting the vba codes to script
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="123"
...
0
votes
1answer
13 views
How to use autodetect schema in big query app script to load string type columns as headers in bigquery table?
I have a google script that loads the csv table from cloud storage to big query. It works fine with most tables but when all the columns types are string, the auto detection is not able to find header ...
0
votes
0answers
10 views
ExpiredKeyMapError in Chrome Browser Console
I am trying to enable Google Maps on a new website. I have gone through the process of creating two API keys - one for a browser and the other for the server. I am using the following guide:
https://...
-1
votes
0answers
20 views
Searching for data with two inputs in google sheets from google web app
I am a beginner in developing google web apps. I have attached my coding here. You guys can compile and have a look on it. So now what Im trying to do is the web app will ask for hse number and street....
-3
votes
0answers
16 views
how to retreive a value of gender to the help of a firstname si a value of gender in a Google app script , is empty?
I look for the module as a link to retreive a value of gender (male or female) at the help of the first name if the value gender of google USER ADMIN is empty ( here the user doesn't fill in the ...
-1
votes
1answer
16 views
Mail something to everyone who sent an Forms Answer in the last 30 days
How do I send a mail to all the responses sent in the latest 30 days?
I know how to send a mail, just don't know how to get the latest answers.
-1
votes
1answer
27 views
Trigger function when adding a row in an other spreadsheet
I have a problem with triggers in Google App Script. I have a spreadsheet holding my users and other stuff (appSheet), and I have a second spreadsheet that holds all the data (dataSheet).
I also built ...
-1
votes
0answers
19 views
Google Form Responses - Using Code to assign a specific value to only new entries
I previously used an array formula to assign a unique ID to new form submissions; but with 27 columns and over 5000 rows of data, the cost to run the array formula interferes with my onformsubmit to ...
0
votes
0answers
20 views
Export Google document as a string representation, then import it back (has to end up identical)
I'm looking for a way to programmatically export a Google Document, to be able to re-import it later, exactly as it was in the first place.
DriveApp.getFileById(file.id).makeCopy(filename) won't do ...
0
votes
1answer
16 views
Google apps script get the width and height of a line in Google slides
I need to get the width and height of the page element on Google slide which is of type LINE.
How do I get the width and height of the line if it is not horizontally parallel. A line can be dialognal ...
-1
votes
0answers
9 views
Apps Script Chatbot authorization issue in Google Chat
We have Apps Script based chatbot that is published to Google Chat through GCP. Initially, when you add the chatbot to your Chat it prompts for authorization:
Authorization prompt
When you Allow ...
0
votes
0answers
11 views
Google Classroom character formatting (Bold, Italics, Underline) via API
While creating an Assigment in Google Classroom we can now change the format/styling of the characters in the description to:
Bold
Italics
Underline
Bullet Points
Can character formatting be done ...
0
votes
1answer
14 views
If you are running a script in Google Apps Script and you have clicked Dismiss, the script continues to run. How do you stop this?
By accident I clicked Dismiss and I had no idea on how to stop the script. Is there any way to do this?
-3
votes
0answers
43 views
How can I select rows by value of the cells and put it in an array to create json output on google spreadsheet script
I'm learning Unity gamedev. I'm trying to make a leaderboard using google spreadsheet.
What I want to do is
Send user's new score from Unity and add it to the sheet as [stage number], [username], [...
1
vote
1answer
27 views
resize the entire rows automatically of multiple google sheet
How to resize the entire rows of all google sheets to 21 Height ( I have approx. 10 Sheets) and i have been trying with below code but its not working.
I have below code which resize the rows ...
-2
votes
0answers
11 views
How to open 100s of images with google docs with the option called “open with google docs”. But this option is limited to single file at a time [closed]
i wanted to open multiple images with this option. I dont have coding background
0
votes
0answers
7 views
Google Script Trigger Collapse Group Problem
I have a problem with time triggers.
I want groups in the sheets to collapse every 30 minutes. I record the macro and set the trigger in script editor.
This is my code:
function zwin() {
var ...
0
votes
1answer
31 views
How the cell locks automatically after checkbox is True . Google Apps Script
my Boss asked me to do this. I have a cell range A: F (A: E protected), F as the checkbox. I want if the checkbox is TRUE then it (which is cell F) will be protected, I can edit it, but not my ...
0
votes
0answers
16 views
Conditionally edit cells based of the value in cells in other rows - Google Sheet using Google Script
I've got limited knowledge of google script and I'm trying to get better every day. I'm trying to conditionally set the value of 2 cells based on the value in cells contained in other rows. I've got a ...
0
votes
2answers
15 views
google sheets hide rows for 1 user
I've inserted a script to hide row when user click on a button in a googlesheet document.
This document is opened simultanously with multiple users.
My problem, when a user click on the button, rows ...
0
votes
0answers
8 views
Simple Mail Merge
I would like some help.
I saw this article on a simple mail merge that doesnt use add-ons.
I have made my own from learning from the link below and also provided my version of it below.
HERE IS THE ...
0
votes
1answer
8 views
Google Apps Script I want to add all users in an organization to a group
Using Google Apps Script I want to add all users in an organization to a group. If possible, it would be great if it also takes users in its sub-organization. I am waiting for your help in this matter....
0
votes
1answer
26 views
Pass Variables between web apps javascript
I am currently programming a take away app in a program called AppLab.(uses Javascript)
The Html code in AppLab is not possible to modify and therefore I had to use an external Web app, where the ...
1
vote
2answers
23 views
How to split single cell with multiple values into single
Please see sample doc:
https://docs.google.com/spreadsheets/d/1Yfry2Xf26JVLeoSXpzuzT8HWZhQz4sQK5KJ5clbH-Dg/edit#gid=0
I have 2 columns of data. Col1 = id Col2 = 3 data points, but multiple rows of ...
0
votes
0answers
22 views
Some Users (8 out of 83) cannot access my script.google web app
After launching google script Web App 8 out of 83 users cannot access my Web app, Error like "This site can't be reached", "Web Page Not Available" prompt on the browser.
I already ...
0
votes
0answers
33 views
Google data studio connector - getFields() get config data
I'm trying to build connector to pull data from REST API. In config section you have to add token in order to get proper data for selected user.
function getConfig(request) {
var cc = DataStudioApp....
1
vote
1answer
31 views
Simple Google Scripts Email Application - POST request failing from Javascript
I am trying to create a simple form on my website that will take a user's name, email, and brief message and send it to Google Apps Script which will then email me with their message. I keep getting a ...
-2
votes
0answers
22 views
Function to add sheet with name in google sheet
So I have a google form to collect my students data and I need to add new individual spreadsheet with sheet name being their roll no. How do I create the custom function in google app script?