I just created this tiny Office script:
async function main(context: Excel.RequestContext) {
context.workbook.names.getItem("Newname").delete;
}
The range name 'Newname' exists in the current workbook, the code runs without error but the name is not deleted. Why? I would expect to receive a runtime error if I'm not allowed to delete range names.