All Questions
Tagged with google-apps-script arrays
1,344 questions
-2
votes
1
answer
110
views
How to sort a 2d array in Apps script (google sheet) base on a 1d array
I have a script that I have been using for some time, but I recently had a bug on the data sorter and since then I have been unable to fix the problem.
I transpose arrays because they are normally ...
0
votes
2
answers
316
views
Bundling changes made by a script, so that it can be reverted by one undo (ctrl+z)
I've written an Apps Script function that sets values to non-contiguous cells in multiple sheets. This particular function is tied to a custom sheet operation that the user can call from a custom menu ...
0
votes
1
answer
73
views
Error copying 2d array contents to Google Sheets column
In GAS, I have a 2d array that I have populated with data and after the function runs I want to be able to push that data into a single column in a Google Sheet. I keep getting an error that the ...
1
vote
3
answers
102
views
Sort a 2d array with 1d array in appscript
I want, to sort a 2d array with a 1d array in appscript.
so that the 2D array is in the same order as the 1D array.
There is the link of the google sheet:
Array 1D
a
b
c
d
e
f
g
h
i
j
k
l
Array 2D
b
...
2
votes
2
answers
239
views
GAS Filter() not returning expected results
In the following [data][1]:
|First Name|Last Name|Email | |--|---|----------| |A |a |[email protected]| |B |b |[email protected]| |C |c |[email protected]| |D |d |[email protected]| |E |e |[email protected]|
, I'm having an issue ...
-4
votes
2
answers
159
views
Map function not returning the expected column (3rd) from array
I'm having an issue retrieving email addresses from the 3rd col in an array (obtained from a Gsheet) using filter and map functions. The call is printing an empty array in the log. Can someone please ...
4
votes
1
answer
133
views
Finding the optimal division of an array
I'm trying to write a function in Apps Script to take a large array of values that I'd like to split as evenly as possible into subarrays of values (a array of arrays). Each subarray would optimally ...
1
vote
3
answers
93
views
Google script Display array with rows of different sizes
I'm using ImportJSON script that is well know to run an API and retrieve data.
This works fine, I've used it many times before.
However this particular API I'm running returns data that has different ...
0
votes
1
answer
58
views
Return index of cell that contains match on two strings
I'm trying to find the index for a cell that contains two string matches. For example, I have a first name and last name. I need to find a cell that contains both of these names in it.
Possible ...
0
votes
1
answer
102
views
Convert Vertical 1D Array Horizontally
Why does temp contains a horizontal 1D array? While temp2 contains a vertical 1D array? How do I transpose temp2 horizontally?
I'm new to coding and I didn't understand some of the explanations I ...
-1
votes
2
answers
111
views
Remove Duplicates from Very Large Array, Keeping Oldest Timestamp
I have a large dataset (400K+ rows by 4 columns). I'm currently grabbing the data into an array using the following (thanks to tanaike):
function getValues_({ spreadsheetId, sheetName, start = 1, ...
0
votes
1
answer
68
views
Using multiple URLS to fetch API JSON Data
I'm currently trying to program a bit of code in Google Apps Script that catalogues item pricing data for an MMORPG by connecting to an API. I've managed to cobble up some code (shown below) that ...
0
votes
0
answers
95
views
Why is the first row failing to change color? (Purpose: Script to change the color of links specifically on script run/onOpen)
This is a script that I'm workshopping to change the colors of any given data range's links. It's meant to re-analyze on open so that there aren't any "slips" of unstyled links where someone ...
0
votes
2
answers
120
views
Cannot Generate a PDF from Google Script
I followed a Youtube tutorial to create a google script that would produce a pdf from google sheets. I was able to recreate what I saw in the video and generated a pdf. When it came time to put in my ...
0
votes
2
answers
79
views
Trying to generate a packing list based on certain stock codes
So I am fairly new to app script. I work for a manufacturing company that has a production schedule which includes things such as sales order numbers, customer name, location, work order numbers, ...