Allow edits made by Office.js API functions (setDataAsync et. al.) to be 'undone' with Ctrl-z
Right now, an app makes changes to the sheet, there's no way for the user to undo those changes (or their previous changes).
Andrea De Gouveia commented
Dear @Michael Zlatkovsky,
Edits made with the API should have control over their affect on the undo queue so that they can meet user expectations.
For example, if I'm storing some data in a hidden cell, I should be able to do that without it ending up on the undo queue. If I'm making a series of changes, I should be able to make sure they all end up in a single undo on the undo queue, or, if I want break them up into a few discrete undos as appropriate.
Michael Zlatkovsky commented
@Jim Barrett, that's a good point regarding read operations. Let me bring this up to my team.
Jim Barrett commented
Please consider in your review that ANY Excel.Run(..) call clears the undo history/buffer, even if the Excel.Run(..) is only doing READ operations on the sheet. For example, a call to get the current selected range breaks Undo -- ctx.workbook.getSelectedRange().load();