Skip to content
Advertisement

Exception: The parameters (number[]) don’t match the method signature for SpreadsheetApp.Range.setValues

This script is to run on multiple spreadsheets and copy (export) selected data to 1 central SS:

JavaScript

Exception: The parameters (number[]) don’t match the method signature for SpreadsheetApp.Range.setValues. doExportBLC @ temp.gs:44

Line 44: search.offset(0, 1, 1, Data.length).setValues(Data);

That script is to search if the ticked was already exported, if no fill new ticket and if yes export data to that line

The part, if no and add new ticket works, the rest to export data isn’t, everything else I get those variables from global constants used on other scripts and that works

I’m getting individual cells from more than 1 sheet and various cells with getValue:

JavaScript

then

JavaScript

to setValues with

JavaScript

As far as I understand that should be the correct way to deal with a 1 dimension array, as the output should be just 1 row

Edit

Added [example].

  • Config and Index are from source SS, where function will run, multiple sheets will run this
  • BLC is from target SS, where data will be exported to

Advertisement

Answer

Without being able to see the spreadsheet I have to guess but perhaps this will help

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement