Does anyone know why this simple code:
async function run() {
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
const rng = sheet.getRanges("A1:A10").load("areas");
await context.sync();
rng.areas.items[0].values = "=B1";
await context.sync();
});
}
produces the expected result when run from Script lab (it fills A1:A10 with the formula =B1, =B2, =B3, …), but fails to even compile in VSCode?
VSCode insists it wants an array of formulas, which is quite inconvenient as you would have to cater for the presence and absence of the $ signs yourself.