set_worksheet_protection
Protect or unprotect a worksheet to restrict user edits, optionally with a password, ensuring locked cells remain unchanged.
Instructions
Protect or unprotect a worksheet. Protection restricts user edits; cells formatted as locked are affected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protect | Yes | True to protect, false to unprotect. | |
| password | No | Optional password for the protection. | |
| sheetName | Yes | Worksheet name. | |
| workbookId | No | Target workbook ID from list_workbooks. Optional when only one workbook is connected. |