我想将数组值粘贴到所需的单元格中。但我在第 23 行遇到错误。
function main(workbook: ExcelScript.Workbook)
{
let emp_sheet = workbook.getWorksheet("Emp");
let cc_id_range = emp_sheet.getRange("F1:O17");
let cc_id_values = cc_id_range.getValues();
for (let k = 1; k <= 10; k++)
{
let cc_id = cc_id_values[0][k - 1];
var b = Number(cc_id); // For example here I get b = 26
if (b != 0)
{
for (let m = 1; m <= 13; m++)
{
let cc_data = cc_id_values[m + 3][k - 1];
var c = Number(cc_data);
console.log(c)
let output_sheet = workbook.getWorksheet("Output_CC");
let output_range = output_sheet.getRange("F2:BM14");
output_range.getCell[m - 1][b-1].setValues(c); // Getting Error here
}
}
}
}
请看这张图片代码