clear_range
Clear cells or ranges in Excel: remove contents, formulas, or formatting, or reset styles to default. Includes data-loss protection and automatic backups for safe edits.
Instructions
Clear a cell or range: what='contents' removes values and formulas, 'formats' resets styles to default, 'all' does both. Neither removes merges, conditional formats, validations, comments, or hyperlinks; those have their own manage tools. Addressed by a location object. A hazardous workbook refuses unless allow_loss is true. Auto-backup: prev/anchor slots in .ks4xl-backups (backup=false skips rotation); atomic verified save, restored on failed verify. Refuses while open in Excel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| what | No | contents | |
| sheet | No | ||
| backup | No | ||
| location | Yes | ||
| allow_loss | No | ||
| verify_com | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||