Undo/Redo of Google Apps Script execution

2019-08-23 03:53发布

问题:

Here is a frustrating feature of Apps Script - and I can't find a workaround. I have event trigger functions which write data to a spreadsheet as appropriate in response to user data entry. If a user enters some data in a cell and realises he didn't mean to do that he can reasonably expect to hit undo. Rather than undo his entry the undo action causes the change made by my script to be undone. This is dreadful, how can I prevent this from happening?

Thanks in advance

回答1:

If you make changes on the spreadsheet by script, the changes can't be undo.

You can look at the version history (File > Version history > See version history) and return to an earlier version