javascript - Google Sheets Script Error - Cannot convert Array to Object[][] -
i'm working on script encode data in fields insertion html (the cells contain words planétarium , rua joão bettega, 01 ). getting error , don't know it. error says "cannot convert array object[][]" i'm passing two-dim array .setvalues() , know that's not (found common problem). ideas? here's function: // columns[] , columns2encode[] set in scope above function function _encodedata() { var sheet = _getsheet(); var data = sheet.getdatarange().getvalues(); var rowcnt = data.length; var colcnt = data[0].length; var data2set = new array(rowcnt-1); // creates array w/ row.length indeces var colencodeindexlist = []; var origval, encodedval, range, cell; // used later in loop(s) toast('start encoding data'); // loop every row for(var ri = 0; ri < data.length; ri++) { if(ri !== 0) { data2set[ri] = new array(colcnt); // creates array w/ length of ~ 29 } // loop every cell (column entry in given row) fo...