I have some gray cells in my spreadsheet that are supposed to accept user input. I have protected all other cells on the sheet:
I want to prevent endusers from changing the cell formatting (background color, borders, merged cells).
The main issue is when the user pastes content from another spreadsheet because the paste carries along with it all of the formatting from the other spreadsheet and un-merges/un-colors cells.
I am trying to do it with onEdit(e), and revert the active cell's formatting. One problem is that if you paste in a GROUP of cells, "e.range" is wrong and displaced:
function onEdit(e){
var row = e.range.getRow();
var col = e.range.getColumn();
Browser.msgBox(row + "," + col); // wrong on multi-cell paste
}
Another approach is to have a clone hidden sheet and constantly copy content from it onto the active sheet, but due to the protections I mentioned, it takes a while to run because it has to iterate through all unprotected cells.
Thank you in advance for any advice.