Spreadsheet
Protection
This group locks a spreadsheet against unwanted changes. It can protect a sheet so its cells can’t be edited, lock or unlock individual cell ranges, hide the formulas behind cells, mark a range as editable inside a protected sheet, write-protect the whole workbook, and remove sheet protection again.
Prerequisite: before using any of these instructions, the workflow must already have
an XLSX spreadsheet created or opened (with Create spreadsheet). All the sheet-level
instructions work on a sheet (tab) inside that spreadsheet, identified by name (Sheet1
by default), which must already exist. Set Workbook Write Protection works on the
whole workbook and has no sheet.
These concepts recur across several instructions in this group; they are explained here once.
-
Document: indicates which document in the workflow the instruction applies to. If left empty, the current document is used. If the document doesn’t exist, the instruction simply does nothing.
-
The sheet must already exist: the Sheet name field chooses which tab the instruction works on, and defaults to
Sheet1. If no sheet with that name is found, the instruction simply does nothing and the rest of the workflow carries on. (This does not apply to Set Workbook Write Protection, which acts on the whole workbook.) -
How locking actually works (important): in a spreadsheet, protection is a two-step idea. Every cell carries a locked flag (on by default) and a hidden flag, but those flags do nothing on their own — they only take effect once the sheet itself is protected with Protect Sheet. So the usual recipe is: first unlock the cells you want people to edit (Set Cell Lock → Locked = No) and/or hide the formulas you want to keep private (Hide Formulas), then run Protect Sheet to turn it all on. Define Editable Range is another exception mechanism that only matters once the sheet is protected.
-
Range: the Range field selects the cells an instruction works on, written as two corners in A1 style — for example
A1:Z100orB2:D10. A single cell likeC5is also accepted. -
Passwords: every protecting instruction has an optional Password. If you set one, the same password is needed later to undo the protection (Unprotect Sheet). Leaving it empty applies the protection without a password. All of these instructions store the password the same way, using the strong modern method (SHA-512), so no protection in the workbook is weaker than another. They are still standard spreadsheet protection passwords — a deterrent to casual editing, not encryption: Set Workbook Write Protection in particular applies write-protection metadata and does not encrypt the file’s contents. Note that older spreadsheet programs may not recognise this kind of password.
-
Dynamic values (
@name): in any text field (sheet name, range, range name, password) you can type@followed by the name of a value saved earlier in the workflow, and it will be replaced by that value. -
“From variable” fields: the
@nametrick only works in text fields. The yes/no options (like Hide formulas, Locked, Read-only recommended, Lock structure, Lock windows) each have a companion “from variable” field:- If you leave it empty, the value chosen in the normal field is used.
- If you fill it in with the name of a saved value, the engine ignores the normal field and reads the value from that variable.
This is mainly for chaining instructions. If you only work with fixed values, you can ignore these fields.
- Define Editable Range .xlsx
- Hide Formulas .xlsx
- Protect Sheet .xlsx
- Set Cell Lock .xlsx
- Set Workbook Write Protection .xlsx
- Unprotect Sheet .xlsx
Define Editable Range .xlsx
Marks a cell range as editable inside a protected sheet — an exception area users can still change even when the rest of the sheet is locked.
When to use it: when you protect a sheet but want to leave one region (for example a data-entry block) open for editing, optionally behind its own password.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Range | The editable cells, as two corners (A1 style). Supports @name |
B2:D10 |
No |
| Range name | A name for this editable area. Supports @name |
EditableRange1 |
No |
| Password | Optional password to edit this range. Supports @name |
(empty) | No |
Important behavior: this only takes effect once the sheet is protected with Protect Sheet. If an editable range with the same Range name already exists, it is replaced. If the sheet doesn’t exist, the instruction does nothing.
Hide Formulas .xlsx
Sets (or clears) the “hidden” flag on cells so their formulas don’t appear in the formula bar once the sheet is protected.
When to use it: to keep the formulas behind your results private while still showing the calculated values.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Range | The cells to affect, as two corners (A1 style). Supports @name |
A1:Z100 |
No |
| Hide formulas | Yes = hide, No = show | Yes |
No |
| Hide formulas (from variable) | Reads the hide setting from a saved value | (empty) | No |
Important behavior: this only takes effect once the sheet is protected with Protect Sheet; the values stay visible, only the formulas are hidden. Each cell’s existing formatting is preserved. If the sheet doesn’t exist, the instruction does nothing.
Protect Sheet .xlsx
Protects a sheet so its locked cells can no longer be edited, and chooses which instructions users are still allowed to perform.
When to use it: the main step that turns protection on. Run it after unlocking any cells that should stay editable (Set Cell Lock) and hiding any formulas (Hide Formulas).
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to protect. Supports @name |
Sheet1 |
No |
| Password | Optional password needed to unprotect later. Supports @name |
(empty) | No |
| Allow selecting locked cells | Yes = users can click locked cells | Yes |
No |
| Allow selecting unlocked cells | Yes = users can click unlocked cells | Yes |
No |
| Allow sorting | Yes = users can sort | No |
No |
| Allow filtering | Yes = users can use auto-filter | No |
No |
| Allow inserting rows | Yes = users can insert rows | No |
No |
| Allow deleting rows | Yes = users can delete rows | No |
No |
| Allow formatting cells | Yes = users can change cell formatting | No |
No |
| Allow selecting locked cells (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow selecting unlocked cells (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow sorting (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow filtering (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow inserting rows (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow deleting rows (from variable) | Reads the yes/no value from a saved value | (empty) | No |
| Allow formatting cells (from variable) | Reads the yes/no value from a saved value | (empty) | No |
Important behavior: every cell is locked by default, so once protection is on, only the cells you previously unlocked stay editable. Any existing protection on the sheet is replaced. If the sheet doesn’t exist, the instruction does nothing.
Set Cell Lock .xlsx
Locks or unlocks the cells in a range (their locked flag).
When to use it: before protecting a sheet, to unlock the cells you want people to be able to edit (or re-lock cells that were unlocked).
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Range | The cells to affect, as two corners (A1 style). Supports @name |
A1:Z100 |
No |
| Locked | Yes = locked, No = unlocked | Yes |
No |
| Locked (from variable) | Reads the lock setting from a saved value | (empty) | No |
Important behavior: the flag only matters once the sheet is protected with Protect Sheet — locked cells then can’t be edited, unlocked ones can. Each cell’s existing formatting is preserved. If the sheet doesn’t exist, the instruction does nothing.
Set Workbook Write Protection .xlsx
Applies workbook-level write protection: a “read-only recommended” prompt when the file is opened, and optional locks on the workbook’s structure and windows.
When to use it: to discourage changes to the whole file, or to stop users from adding, deleting or rearranging sheets.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Password | Optional password for the protection. Supports @name |
(empty) | No |
| Read-only recommended | Yes = prompt to open the file read-only | Yes |
No |
| Lock structure | Yes = users can’t add/delete/rename/move sheets | No |
No |
| Lock windows | Yes = the workbook window layout is locked | No |
No |
| Read-only recommended (from variable) | Reads the setting from a saved value | (empty) | No |
| Lock structure (from variable) | Reads the setting from a saved value | (empty) | No |
| Lock windows (from variable) | Reads the setting from a saved value | (empty) | No |
Important behavior: this is not file encryption — it applies write-protection metadata only, it does not scramble the file’s contents. If both Read-only recommended is No and no password is given, the read-only prompt is not added. If both Lock structure and Lock windows are No, no structural lock is added. This instruction works on the whole workbook, so it has no Sheet name. If the document doesn’t exist, it does nothing.
Unprotect Sheet .xlsx
Removes protection from a sheet.
When to use it: to re-open a previously protected sheet for editing.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to unprotect. Supports @name |
Sheet1 |
No |
| Password | The password the sheet was protected with. Supports @name |
(empty) | No |
Important behavior: if the sheet was protected with a password, you must supply the matching password — with a wrong or missing password the sheet is left protected and the workflow carries on with the next instruction. If the sheet isn’t protected, the instruction does nothing. If the sheet doesn’t exist, the instruction does nothing.
This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.