2021年3月4日星期四

Excel add-in : Delay execution while cell is being edited - not working

I've written the following code which invokes selected function and puts in a selected cell. I've used the delay execution of a custom function till user exits the cell. But this is not working. Function is executing with out waiting for user confirmation. Following is my code

async function run() {   try {        await Excel.run({ delayForCellEdit: true }, function (context) {           const currentCell = context.workbook.getActiveCell()          // Read the range address        currentCell.load("address");        var totalFormulas = [["=NS.ADD"]];        currentCell.values = totalFormulas;        currentCell.format.autofitColumns();        currentCell.select();        return context.sync();     });   } catch (error) {      console.error(error);   }  }  
https://stackoverflow.com/questions/66477537/excel-add-in-delay-execution-while-cell-is-being-edited-not-working March 04, 2021 at 10:54PM

没有评论:

发表评论