Skip to main content

Protect Worksheet

Excel·v1.11.1
ExcelWorksheetsWrites files

Stop a sheet being edited by accident. This is not security: an Excel sheet password is trivially removed, so use it to protect a report from mistakes rather than to keep a secret

Inputs

NameTypeRequiredDefaultDescription
Excel Instance
excelInstance
variableRequiredNot set
Sheet Name
sheetName
stringOptionalNot setLeave empty for the first sheet
Action
action
enumOptionalprotect
protectunprotect
Password
password
passwordOptionalNot setOptional. Not security: Excel sheet passwords are removed in seconds
Shown when action = protect
Editable Range
editableRange
stringOptionalNot setCells still open for typing, such as D2:D500. Without this nothing can be edited
Shown when action = protect
Allow Sorting
allowSorting
booleanOptionalfalse
Shown when action = protect
Allow Filtering
allowFiltering
booleanOptionalfalse
Shown when action = protect
Allow Formatting
allowFormatting
booleanOptionalfalse
Shown when action = protect
Allow Inserting Rows
allowInsertingRows
booleanOptionalfalse
Shown when action = protect
Allow Deleting Rows
allowDeletingRows
booleanOptionalfalse
Shown when action = protect

Compatibility

WindowsLinuxAttendedUnattended

Related activities