lundi 3 mars 2014

How to add user-defined functions in code.gs in the Google Script Manager


Vote count:

0




I'm trying to add my own functions to a Google Apps script attached to a spreadsheet but I keep getting the error "Missing formal parameter". My fundamental problem is that I don't understand how the different functions and .gs files in the Script Manager interact...


In the Script Manager, I've already modified Code.gs and it does what I intended. I'm now trying to add a second function to Code.gs:



function sliceCol(2darray, col){
var column = [];
for(var i=0; i<2darray.length; i++){
column.push(2darray[i][col]);
}

return column;
}


"2darray" and "col" are not defined elsewhere and are placeholders for the 2darray and integer that I want to pass to this function.


Can someone please help me understand how to do this?


Many Thanks.



asked 31 secs ago






Aucun commentaire:

Enregistrer un commentaire