Help Centre › Building Processes
This article describes the RPA Excel functionality to lock cells.
For a full list of available functions, please read EXCEL functions.
Description
The EXCEL Lock cells function locks or unlocks specific cells so they cannot be edited when the sheet is protected. Use this together with sheet protection to control which cells users can modify.
Setting it up
To use the EXCEL Lock cells function, follow these instructions:
{{popups:rpas/add:action=excel-cell-lock}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down
- Click on “+ Activity”
- Select the EXCEL Lock cells option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Cell | Yes | Text | - | The cell or range to lock/unlock (e.g. A1:B10) |
| Locked | No | Switch | On | Lock cells (on) or unlock cells (off) |
Output variables
This action does not produce output variables.
Errors
| Error | Description |
|---|---|
| File not open | The Excel file must be open |
| Invalid range | The specified cell or range is not valid |
Tips
- Locking cells only takes effect when the sheet is protected using the Add sheet password function
- By default, all cells in Excel are locked – use this to unlock specific cells before protecting the sheet
- Set Locked to off to allow users to edit specific cells in a protected sheet