I have 2D array question in google spreadsheet using app script.
I know to get make the code fastest, I'm supposed to use as few get and set functions as possible. So I'm trying to read a whole sheet into an 2D array first then referencing parts of it. Except I'm not sure how to reference the 2D array once it's in.
Here is what i have done so far.
var ss = SpreadsheetApp.getActiveSpreadsheet()
var COMPANYIOSheet=ss.getSheetByName("Sheet1");
var IO_array= COMPANYIOSheet.getRange("A1:c10").getValues();
I want to do something like:
var subarray=IO_array[3:5][1];
but that doesn't work. I can only seem to reference just one point ie:
var subarray=IO_array[3][1];
How do i slice into a sub 2D array?
Thanks.