I'm writing a script for use in Google Sheets where it returns an array of arrays for the purpose of filling out multiple columns and rows.
I've got
var results = new Array(2);
var info = new Array(2);
info[0] = "some string";
info[1] = "other string";
results[0] = info;
results[1] = info;
return results;
The first column will be blank when it should have "some string", while the second contains "other string"
Assuming that you are asking about Custom Functions in Google Spreadsheets, your code currently returns a 2x2 table with the values:
|----------------------------|
| some string | other string |
| some string | other string |
|----------------------------|
If you want the following:
|----------------------------|
| some string | other string |
|----------------------------|
Then your code should be:
var results = new Array(2);
var info = new Array(2);
info[0] = "some string";
info[1] = "other string";
results[0] = info;
return results;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With