Questions tagged [google-apps-script]
Google Apps Script is a JavaScript cloud scripting language for automating tasks across Google products and third party services.
73
questions
4
votes
0
answers
31
views
Google App Script to take form responses submitted by teachers on their students and produce formatted PDF student reports
I'm not a programmer but, with help, I managed to make a Google Apps Script which takes reports, submitted by teachers on their students, to the Form Responses Sheet, and then selects all responses ...
1
vote
1
answer
149
views
Copy and Pasting Values from Spreadsheets
Background
This code is apart of a library I'm developing for my company. It takes in anywhere from 3 to 5 arguments. All of the code functions properly. To be more specific, a user has data on a ...
6
votes
2
answers
292
views
Sending Email Through App Script
Background
This is a function that is part of a library written in GAS. A function inside a library I've written is supposed to send out an email to another user or users with accompanying details (...
1
vote
1
answer
83
views
Pulling Data from an Email and Pasting it into a Google Spreadsheet
Background
The reason why I'm doing this is because at my company, we get emails a lot from different locations that have relevant data we need for other processes. The problem is that this data is ...
2
votes
2
answers
2k
views
Slow performance of Google Apps Script that updates data
I have a Google Spreadsheet with a few hundreds of sheets there. Users update those sheets with new data under a strict and specific template. I created a Google Apps Script where once every while, I ...
1
vote
1
answer
47
views
Grouping arrays with different lengths to make a single sentValues() for the spreadsheet
Currently I find out which is the biggest array and from it I generate a while loop and I go around errors with try catch:
...
1
vote
1
answer
141
views
Replace/remove all diacritics and converting different letters to Latin alphabet in multiple spreadsheet columns (multidimensional array)
Attention: if you read the question and are going to use the defaultDiacriticsRemovalMap in
the future → I analyzed the name of all professional football athletes
...
0
votes
1
answer
293
views
Google App Script Automation for User Onboarding
Background
I am a relatively new developer(> 2 years coding) working as an intern for a smaller company, as part of a now 4 person team. We had two other team members, one our system admin and the ...
0
votes
3
answers
100
views
List with values not found in another list when each index has two objects
As the question already says, my code returns a list with the index's that don't exist inside another list.
For this I currently create two lists joining the objects of each index, then filter the ...
2
votes
0
answers
33
views
Pull pictures from folders on Google Drive and add them to a Sheet
I have code that I have been using for 2 years and it was working perfectly until recently. It started to give a timeout warning a couple of weeks ago and now it's not really running anymore. The code ...
1
vote
0
answers
103
views
Embedded Google Apps Script to search for and collect a copy of files in Google Drive
Embedded Google Apps Script
I've written an embedded Google Apps script to advanced search Google drive for files matching search parameters supplied in the hosting spreadsheet.
Link to Google sheets ...
3
votes
2
answers
88
views
Calculate cumulative daily rainfall
It took me a while to compute this script, it works perfectly, but I think that it is very raw and long.
The goal of the script is to produce a graph of cumulated rainfall with 3 lines:
Cumulated ...
-1
votes
0
answers
204
views
Pulling data from an API and working with it in Google Sheets
I'm trying to build out some DeFi position tracking pages in Google Sheets. I want to pull from the Zapper API (or other APIs) to track trades, positions, gains, losses, fees...etc. This is my first ...
1
vote
1
answer
39
views
Set Dates on Spreadsheet Rows
I'm trying to get this to run faster, even marginally so. Right now to update 470 rows it takes about 90 seconds. It works, but I know there are better ways. I understand calls to Spreadsheet API are ...
1
vote
1
answer
69
views
New Spreadsheet Row to YouTube Playlist
I have the following code below that takes a new row added to my Google Spreadsheet (has a header row) and extracts the video ID. If the ID does not exist in the playlist, it adds the video to the ...
2
votes
1
answer
813
views
JavaScript: proper user of SJCL encryption in Google Apps Script
I'm using the minified version of SJCL to encrypt the backup files requested by the users. It is in a Google Apps Script add-on for Google Sheets.
I'm mostly concerned with correct use, exception ...
3
votes
1
answer
110
views
Faster way to copy rows of data to different sheets by column value
I'm trying to find a faster way to copy specific rows of a sheet to different sheets. Iterating through them as done in code below takes too much time it leads to timeout.
Some information about ...
2
votes
0
answers
33
views
Google Script is slow. Using arrays. Anything else I'm missing?
I'm trying to add students to Google Classrooms ('Courses') from a Google Sheet with code below (function AddStudents).
It's very slow and, if I do too many, it exceeds allowed execution time. Is ...
4
votes
0
answers
37
views
Rearranging data from one table to another in spreadsheets using apps script
I need some help with making my code run faster. It currently works by going through all cells in a 201x151 table. If the value in a cell is not equal to zero, then it will return the row number, the ...
2
votes
0
answers
574
views
Saving an Array to PropertiesService in Google Apps Script
I have the same array set up as a variable inside of each function - I want to make this easier to manage. The array contains multiple strings of values. I’ve attached code below that I've been ...
2
votes
1
answer
261
views
Nesting for loops to find matches in different tables
I'm not sure if I'm even approaching this correctly (still very much learning), but this is what I'm attempting to accomplish:
My script gets an array from a column (tab names of the sheet) and then ...
4
votes
1
answer
135
views
Google apps script Exceeded maximum execution time issue or 29k rows
I built some code to update dates from a Dump file.
I am commonly running into an "Exceeded maximum execution time" message. Otherwise the code works fine. It imports & updates statuses for 16.5 ...
1
vote
0
answers
38
views
Faster Google Spreadsheet access and direct use of Named Ranges for code readability
This object structure, that I think might be useful for a number of projects, attempts to:
learn the use objects (classes are not available in Google Apps Script) and inheritance
minimize calls to ...
2
votes
0
answers
26
views
Google Script - Calendar events not owned by me
I'm trying to write a script to delete event invites from my personal google calendar. I get invited to multiple events everyday such as "Click here to win an iPhone" etc.
I have written a google ...
3
votes
1
answer
121
views
Bracketing multiple onEdit functions [closed]
I have multiple onEdit app script functions in my Google Spreadsheet which work individually but I cannot work out where to put the brackets to nest them. This is my code which is a little messy and ...
6
votes
0
answers
65
views
HR Data Entry Form allows addition of new employees and update of existing employees
Business Process: Data entry form allows HR employees to input data for new employees, update data for existing employees, or terminate employees. Three data storage sheets exist for existing ...
-4
votes
1
answer
64
views
Minimize this IF statement [closed]
I was going to post this in code golf, but I think it may be better suited here. I'm not really interested in scoring it beyond accepting the best answer.
I'm wanting to minimize this series of <...
3
votes
0
answers
1k
views
Eliminate all empty cells via vertical merging: Google Sheets
I am working with a spreadsheet containing a bunch of 'sections', e.g where the 'URL' column is set to 'google.com/search' in A1, and left empty while a bunch of things related to that URL are done in ...
1
vote
0
answers
32
views
Adjust entries in Google Sheet for short orders
I am relatively new to scripting. My programming experience stems from a QBASIC course when I was 11, and teaching myself HTML when I was a teenager (a while ago).
This script resides on what is ...
3
votes
0
answers
30
views
Google Scripts (Add, Remove & Moving Record) stop timeout
What is it?
The google sheet that the macros are on acts as a sort of "back-end" for the records of a behaviour system at a school. I build multiple google sheets that link to this one that pull the ...
3
votes
2
answers
2k
views
Function to format numbers with thousand separators and decimals
I've wroted this function because I was getting trouble using toLocaleString() in google-apps-script, and after some refactorings I got to a working code:
...
2
votes
1
answer
561
views
Google Apps Script to create an invoice
I am using Google Execution API to create an invoice and it's a small part of a bigger system. However, my boss is pretty displeased at the total execution time before an invoice is generated. It ...
1
vote
0
answers
29
views
Google App Script sheet that moves row to correct sheet
I've got this code to loop through each cell in Column A and check the cell value. If the value matches the if criteria it moves the entire row to the correct Sheet and then replaces the Column A cell ...
0
votes
1
answer
327
views
Google Apps Script shifting columns containing specified substring - using array functions
The link is to the example sheet of what I have done
This code solves the problem of shifting large amounts of specific data in a google spreadsheet. The data is shifted to the right by one column, ...
3
votes
1
answer
572
views
Modal displayed in Google Spreadsheet from Gscript
First: I'm not really a programmer. Thus, this application may be started in a bad way, but here is my question.
It's not a specific one because I have no real clue about how to improve my code. Let ...
1
vote
1
answer
267
views
Hide rows where column F is not empty
I'm not a scripting expert by any means, but I put together some code that I needed for Google Sheets. The good news is that it actually works!
However, it's noticeably slow to run (about 15 ...
2
votes
1
answer
143
views
Returns Google Sheet cells from a named range
I've got this function that's called in several places in some of my Google Spreadsheets. It accepts a Range object, a string to ...
1
vote
1
answer
28
views
Copying contents of cells in a vehicle-tracking Google Sheet
This is really my first shot at scripting anything. What I have below works, it does exactly what I need it to, but this is only a quarter of the total function. Clearly, I need to cut down the length ...
6
votes
1
answer
830
views
Bottlenecks in asynchronous JavaScript code for Google Map
I'm working on a pothole map web app in Google Apps Script. The map gets its data from a Google spreadsheet (from manual surveying), which is then transformed via hits to the Geolocation and Google ...
2
votes
1
answer
65
views
Extract a number from a consecutive range in a Google Sheet
I'm new in coding and I use google script in my spreadsheet to add a list of consecutive numbers automatically by giving the first number to add and the last one (with an arrival date and an option "A"...
4
votes
0
answers
703
views
Generating Bitly links in a Google Sheet
I have this set of functions in my Google Sheet to create a Bitly bitlink whenever data in a row is changed. While this does work, it seems really slow to me. Looking at the Execution transcript, it ...
2
votes
0
answers
59
views
Identifying spreadsheet clashes in Google Apps script
This is an attempt at porting some of my boss's code from VBA to Google Apps. Are there more elegant ways of doing this? I know that later versions of ECMAScript can do this more nicely but Google ...
1
vote
1
answer
851
views
Lock-range code for Google Scripts/Sheets
This code locks a range and adds a timestamp. More details below. I'd like to learn how to make this code more efficient (minimize code/variables and reduce redundancy). Any thoughts on the areas I ...
0
votes
1
answer
106
views
Setting values in a spreadsheet
I have put together the following script to automate a process I have to perform at my work. The script solves some basic math functions and then inputs text values in certain cells. I have several of ...
3
votes
1
answer
542
views
Spreadsheet generated through Google Drive file iteration
I put together a script which goes through all of the files in Google Drive, and writes a spreadsheet with all of the files with their name, containing folder, URL, and date last updated.
...
1
vote
1
answer
349
views
Dependent dropdown
I've created this code (used the validation creation section from here) which creates dependent dropdown lists based on data which is in a pivot table style arrangement.
The idea is that picking a ...
4
votes
1
answer
385
views
Exporting unread mail details for further processing
As the result of some expert procrastination I have over 4000 unread mail in my gmail box. While that does not hold a candle to what some people likely have I wanted to try and do something about it. ...
4
votes
0
answers
92
views
Protection for cells in Google Sheets
Is there some way to speed this up, since it keeps timing out while running?
The spreadsheet is shared with a Google Group with editing permissions. I've loaded what I can into memory but each ...
8
votes
2
answers
3k
views
Creates a menu and sidebar in Google Spreadsheets
In an effort to make my code more testable, I'm trying to make use of constructors and prototypes.
Here is a working Google Apps Script (GAS) for creating a new submenu under the Addon main menu in a ...
1
vote
1
answer
754
views
Google App Script to calculate score card for a certain person, create PDF file, store to drive and email to person
I'd appreciate if someone could cast an eye over my dodgey coding and give me some feedback.
The use / purpose of the sheet/script is to quality grade calls, emails and chats with customers. A form ...