I have a sheet in which you must enter dates in column A. These must be entered by running a script that is in the menu bar.
Column A is protected for all users except for my who created it . I do not want the dates to be entered by hand but only by running the script.
Date the copy of another sheet and paste it as "value" so that it does not change when the sheet is updated.
When I execute it, it does not give any problem, but when it is executed by another person to whom I have shared the sheet, it gives the warning that the column is protected.
How do I temporarily remove the protection with the script, or how does a user execute the script under my name?
This is the code:
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('OTROS DATOS')
.addItem('Ingresa Fecha Actual', 'getRangeValue')
.addToUi();
}
//******************** INGRESA FECHA ACTUAL EN CELDA ACTUAL *************************
function getRangeValue() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange('Validadores!A2');
var cell = sheet.getActiveCell();
var R = cell.getRow();
var C = cell.getColumn();
range.copyTo(sheet.getRange(R,C), {contentsOnly:true});
}