isLocked

checks whether a cell(s) is(are) locked

boolean isLocked(string cell);

Parameters

cellstringthe id of a cell

Returns

booleantrue, if the cell is locked, false if it's unlocked

Example

// checks whether a cell is locked
var cellLocked = spreadsheet.isLocked("A1"); 
 
// checks whether several cells are locked
var rangeLocked = spreadsheet.isLocked("A1:C1");
 
// checks whether scattered cells are locked
var cellsLocked = spreadsheet.isLocked("A1,B5,B7,D4:D6");

Details

If several cells are checked at once, the method will return true, if there is at least one locked cell among the specified cells.

See also
Back to top