I have two scripts, each one bounded to different spreadsheets. Just script one is bounded to a cloud project while script two is not. I saved the first script version with identifier: "scriptOne"
This is the function in script 1 (which does return the value I want when using the log):
var ss = SpreadsheetApp.getActive().getSheetByName("someSheet");
var one = ss.getRange(2, 1).getValue();
function scriptOneFunction() {
return one;
}
I have a second script and i made sure to select scriptOne.v1 within libraries (development mode "on") and now I am trying to call this function from the second script as follows:
function callScriptOne() {
var two = scriptOne.scriptOneFunction();
Logger.log(two);
}
The error I get:
TypeError: Cannot read property 'getRange' of null
at [scriptOneFunction](callScriptOne:2:17)
What am i doing wrong?