I'm currently working on a pre-filled sheet, that is made available on Google Drive, for users to keep track of their personal data. As there are too many users and the data being personal, they cannot edit the source file, hence the need for copy.
However, some cells contain formulas and/or data that may not be modified as this has been pre-set. As they copy the sheet, all existing protections in-place get dropped or reflect back to them as the'owner, rendering it useless.
After Googling I found out that Google does not have a default 'undo' function to run as a script. My thought would be to instead create a function onEdit() that would fetch the original value of said cell before edit, return a message saying the user can't edit the cell, and cancel the actual edit and/or revert the cell back to its initial value.
I understand I'd need to find a way to store the data before an edit, so that the script knows what to return. This part is however something I cannot seem to wrap my head around.
Any suggestions would be tremendously helpful!