Home > front end >  Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.se
Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.se

Time:02-15

I was coding and i got stuck on this error. It keeps giving me that error "Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.setValues." on the .setValues line which doesn't make any sense to me.

Here is my code.

var finalPercentage5 = percantage5.map(x => [x]);
    Logger.log(values.length)
    Logger.log(finalPercentage5)
    Logger.log(finalPercentage5[4][0])
    for (var row=3; row<values.length; row  ) { 
      if (M4.includes(values[row][0])) {
      var i=0;
          Logger.log(finalPercentage5[i][0])
        ss.getRange(row 3, 28).setValues(finalPercentage5[i][0]);
        i  ;
              
        }
    }

I tried to debug it and it seem to me it is a number!

Here is a picture of the error:

enter image description here

Would really appreciate the help

If you any questions please let me know.

Thank you.

CodePudding user response:

Try to change:

ss.getRange(row 3, 28).setValues(finalPercentage5[i][0]);

with:

ss.getRange(row 3, 28).setValue(finalPercentage5[i][0]);
  • Related