Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

0
votes
0answers
11 views

Add one column after E column in all sheets [duplicate]

any ideas how can I add a Column after a determinate column in all sheets in one time?
0
votes
1answer
52 views

Google Apps Script with local drive attachment

Can Google Apps Script send an email through Gmail with an attachment from a local drive not Google Drive? If so, how?
0
votes
1answer
41 views

Avoiding an authorization request for Google Scripts

I'm in the midst of trying to custom code some script that will automatically hide some sheets from some users in a shared company spreadsheet. Yesterday it seemed to be working fine, but now it seems ...
0
votes
2answers
132 views

The script does not have permission to get the active user's identity

Anyone know why this caused The script does not have permission to get the active user's identity.? I don't have any functions that asks for the user identity. So I'm a little confused. function ...
0
votes
1answer
22 views

Getting changeType Attribute in edit Trigger Google Apps Script

How can one tell the action triggered the onEdit function in Google Apps Scripting? The actions I have found to trigger it include: edit a cell delete a cell or range cut or copy a cell or range Copy ...
0
votes
0answers
24 views

How to use Sheet, Range protection and Conditional formatting simultaneously in Google Sheets?

I have created a google sheet for my sales team having two members. Gave access to them for two columns (Followup Date and Status) to fill their daily report. I have created another column '...
1
vote
1answer
60 views

Add a new row to a spreadsheet, copying down formulas when a certain cell reaches a particular value

I've got a simple Google Sheet (it's literally one line), that has in A2 =now() to calculate the current time, and then a series of formulas calculating various dates/times based on the current date ...
0
votes
0answers
21 views

How to auto add user name who have access to Google Spreadsheet?

I already have a script for timestamp but I want to add also the username who have access as well in the Spreadsheet, perhaps to be entered automatically in the third column of offset col. Hope ...
0
votes
0answers
20 views

Insert Date When Enter is Pressed in Google Docs?

I'm trying to create a document that serves as an Event Log. For that I would like that once the enter is pressed, the date and time are automatically inserted. I am new with App Script. I think I ...
0
votes
1answer
22 views

.getActiveSheet function work for every tab but one

I have the following function that adds the latest edit time to the L1 cell in our spreadsheet - function onEdit(e) { // Prevent errors if no object is passed. if (!e) return; // Get the ...
0
votes
0answers
23 views

Clear cells throughout a column based on value in corresponding column

I have the below script, but am needing to make a slight adjustment/have a query Is it possible/how can I restrict this to only work with one specific sheet, not all within the workbook? How can I ...
0
votes
0answers
58 views

Can I activate a filtered view in Google Sheets from a script?

Can I activate a filtered view in Google Sheets using a script? I've been looking for a preexisting function but can not find one. Is this possible to do? I can't use normal filters as more then one ...
0
votes
1answer
81 views

Speed up Google Sheets scripts

I use following scripts to do the following: Insert newline Copy info from line below to newline script takes extremely long, how do I function rijToevoegen() { var spreadsheet = SpreadsheetApp....
2
votes
1answer
75 views

Do new Gmail OAuth policies affect code I've written for myself?

I have a Spreadsheet in my Google Drive account with my own code which accesses my mails on Gmail, searches for unread, starred mails with a certain label and forwards this mail to different receivers....
0
votes
0answers
12 views

Dates entire week Google Spreadsheet with script

I'm building a tracker and I want different pages to represent different weeks, but I don't want to mannualy put in all the dates of the entire week, every week. Is there a script that I can use that ...
0
votes
0answers
15 views

Multi url parsing in G Sheet

Sorry i am just a newbee in stackexchange, its great solution place, i have followed Question Edited I have got to accumulate the data from 7 to 10 urls which are rss feeds, xml feed and from json ...
0
votes
1answer
21 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....
1
vote
0answers
17 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 ...
1
vote
1answer
25 views

Sheet Specific Scripts

I'm currently using the below script to timestamp when an edit is made to column 7 on a sheet named "Sheet 1". function onEdit(e) { if ([7].indexOf(e.range.columnStart) != -1) { e.range.offset(...
0
votes
3answers
55 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
1answer
173 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 ...
0
votes
0answers
10 views

GAS & sheet with multiple variable height charts. How to set position

In a Google Sheet I am inserting multiple chart dynamically. function formatCharts(cTargetSs,cSheetFrom,anchorRow) { var sheet = cTargetSs.getSheetByName('Charts'); var sheetFrom = cTargetSs....
0
votes
1answer
20 views

Google Sheets Query Searching?

I'm trying to run a Query on some data that's being imported, and have it only Bring data over that matches the Email in the document. This is my code: =QUERY(IMPORTRANGE("SHEET ID REMOVED","'Form ...
0
votes
2answers
54 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 ...
0
votes
0answers
69 views

How to create button that copy column and paste values in to another sheet

I`ve created google spreadsheet with several sheets. I need to create button with function that allows me to copy values of the 2 columns in sheet "test_air" and paste them in to sheet "Skaiciavimai"....
1
vote
0answers
9 views

Transactional execution in Google Sheets Script?

I am working on a script that moves quite a bit of data around in a spreadsheet, and in some cases appends data to data. When the script finishes, clicking undo cycles through each step that the ...
0
votes
1answer
51 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
1answer
31 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 ...
0
votes
0answers
61 views

Google Sheets macro for printing

I wrote the next macro, but isn't working. For example: I have a button on the sheet (invoerblad) for printing, the button must print the sheet (Printblad), and when the print action is finished, it ...
0
votes
1answer
78 views

Fine tuning a find and replace code

I have this code that works to find the word “Yes” and replace it with a 1. How do I also add in a line for it to find “No” and replace it with a 0? function fandr() { var ss=SpreadsheetApp....
0
votes
0answers
13 views

Use script to populate one sheet from data of another sheet

I have a problem with writing a script to input data from one sheet to another. Here is what I have: In sheet1 I have a list of products with a unique number in column A. In sheet2 I want to be able ...
1
vote
0answers
14 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
1answer
79 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
1answer
84 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 ...
0
votes
2answers
19 views

Duplicating sheets with simple date from a named range

When I run the script to duplicate sheets with a date is give the tab a long date name Thu Oct 18 2018 00:00:00 GMT-0400 (EDT). I would like it to read in a 10/18/18 format.
0
votes
1answer
41 views

Is it possible to calculate in the background of a data validation cell?

Is it possible to calculate in the background of a data validation cell? I am creating a quite comprehensive spreadsheet that shall help me calculate dice pools in an RPG, but to not trouble you with ...
1
vote
0answers
17 views

getUi.prompt - How to enable confirmation with “Enter” key

When using SpreadsheetApp.getUi().prompt();, how do I allow the user to simply press Enter to confirm their entry instead of having to click on OK?
0
votes
1answer
156 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
0answers
57 views

Google App Script start new Hangout Chat

I am looking for help leveraging a Google Script that starts a Hangout Chat session when a script is started in a Google Sheet. Ideally, I get the URL and enter it into the Sheet itself. Flow of ...
0
votes
2answers
64 views

Get a list of Drive files into a spreadsheet

I am playing around with AwesomeTable and like the Post-It template. My use case is to curate a nice interface to a list of frequently used files. The list won't change dramatically over time, but ...
0
votes
1answer
38 views

How do you delete certain cells before copying?

I want to copy IDs and dates and have written this script so far. function copy(){ var s1=SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); var s2=SpreadsheetApp....
0
votes
1answer
249 views

Exporting Google SpreadSheet to PDF (filename referring to a cell D7)

I have developed a script which allows me to export a spreadsheet to a pdf file with a click of a button. I have assigned the script to a macro so that it is triggered by clicking on an image. Script ...
0
votes
0answers
142 views

Google sheets script copying formatting *but not* merged cell status

I would like to write a script that copies the formatting, and the conditional formatting, that is applied to cell A1, and applies it to all of the other cells in the sheet. However, I do not want ...
0
votes
0answers
12 views

Google Dataflow jobs monitor, embed in Google site/website

Is it feasible to embed Google dataflow in Google site or any other website? I noticed that Google dataflow supports Python and Java and there is a lot of documentation. I am using javascript/google ...
0
votes
1answer
72 views

How to extract a link URL from one word within a paragraph element in Google Docs with Google Apps Script

I'm trying to pull the URL of a hyperlinked word from within a paragraph element in a Google Document using Google Apps Script. Below are two GAS functions. The 1st doesn't work. The hyperlink is only ...
0
votes
0answers
22 views

Random PIN for each entry on a Sheet

There's a list of people that could change in size from time to time. I have a column that I want to contain a unique 5-digit PIN for each person on the list. I want to write a script that will create ...
0
votes
0answers
47 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 ...
1
vote
1answer
353 views

How do I insert an image from Google Drive into email body with script

Could anyone help me? I've created a Google Form that uploads a file (image) to a private drive folder, the form also sends responses to a Google Sheet including the image's URL. The code below gets ...
0
votes
0answers
183 views

extract a text between an HTML tag specified by a class in google script

I'm using below function to avoid using importxml in Google Sheets: function importRegex(url, regex_string) { var html, content = ''; var response = UrlFetchApp.fetch(url); if (response) { ...
1
vote
0answers
255 views

Duplicate sheet but keep protected range with exact same user as only editor?

The following code duplicates a sheet based on a template, and copies over the protected range permissions from the template sheet to the new sheet. However, the permission range is now there in the ...