我一直在努力使变量等于数组中特定元素的值,我希望有人能提出建议。在这种情况下,我试图获取单元格 E5 中的值
async function main(context: Excel.RequestContext){
let workbook = context.workbook;
let worksheets = workbook.worksheets;
let sheet1 = worksheets.getItem("Sheet1");
var currentMonth = 1
var months = sheet1.getRange("E5:AD5");
months.load("values")
await context.sync();
monthValue = months[1][currentMonth].value
console.log(monthValue.values)
}
任何帮助将不胜感激!