vsto in excel 时 选中一个cell进入编辑状态 其他操作出错

    xiaoxiao2022-06-29  39

    目前可以有办法检测处于编辑状态 但没有接口能取消这个状态

    public static void VerifyExcelIsNotInCellEditMode() { if (Globals.ThisWorkbook.Application.Interactive) { try { //Will throw an error if user is editing cell Globals.ThisWorkbook.Application.Interactive = false; Globals.ThisWorkbook.Application.Interactive = true; } catch { throw new Exception("Excel is in Edit Mode."); } } }

    转载请注明原文地址: https://ju.6miu.com/read-1124877.html

    最新回复(0)