Feedback by UserVoice

I suggest you ...

Add Workbook.CancelEdit or WorkSheet.CancelEdit to get around GeneralExceptionError when cell being edited

It would be great to have a CancelEdit or have the Range Select / setting range values automatically cancel the editing and avoid this error which seems to have no workaround.

Whenever a cell is being edited by the user, any attempt to select a different range or update values in different ranges causes the General Exception error. There is no method to Cancel the Edit (essentially just need to send the ESCAPE keystroke to the workbook).

To reproduced just double-click on a cell to go into edit mode and then execution of this code fails:
Excel.run(function (ctx) {
//this line enough to fail
return ctx.sync();
}).catch(function (error) {

})

See this thread:
https://stackoverflow.com/questions/38307300/generalexception-if-cell-being-edited

50 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Brian Edwards shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    Hi Brian. Thank you for your input, it is greatly appreciated! We’ve added this to our backlog as something we want to implement. There are many items on the backlog, so we can’t set an exact estimated time for this, but we’ll keep you posted with status updates.

    Thanks!
    Office Extensibility Team

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base