Pls help me to understand what happening. I have code
function splitWords() {
var list = SpreadsheetApp.getActiveSheet();
var list_Key = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Keys');
if (list.getName() !== list_Key.getName()) {
SpreadsheetApp.getUi().alert('Для работы функции перейдите на страницу Keys');
} else {
var array = list.getRange('C2:C').getValues();
var t_array = array.filter(String).lenght;
SpreadsheetApp.getUi().alert(array);
var array1 = array.reduce(function (s, c) {
var key = c[0];
var keys = key.split(" ");
for (var i in keys) {
if (!s.includes(keys[i])) {
s.push(keys[i])
}
}
return s;
}, []);
SpreadsheetApp.getUi().alert(array1);
SpreadsheetApp.getActive().getActiveSheet().getRange(2,8,array1.length,array1[0].length).setValues(array1);
}
}
When code comes to setValues()
i have error.
The parameters (number[]) don't match the method signature for SpreadsheetApp.Range.setValues