replace_cells
Find and replace cell contents across an Excel workbook, sheet, or range using exact, substring, or regex matches; preview changes with dry-run and apply safely in one batch.
Instructions
Find-and-replace across a workbook, sheet, or range. match is exact (whole cell), contains (literal substring), or regex (timeout-guarded; backreferences like \1 work in replace). look_in 'values' rewrites literal cells, 'formulas' rewrites formula text (the cell stays a formula, normalized), 'both' does both. dry_run=true previews every change without touching the file; a real run validates the whole plan first, applies it as ONE batch, and reports cells changed and occurrences replaced. A replaced value that parses as a number is written as a number; replacement text beginning with =, +, -, or @ is written as TEXT to block formula injection unless formulas is true. A hazardous workbook refuses unless allow_loss is true. Auto-backup to .ks4xl-backups; atomic verified save. Refuses while open in Excel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | ||
| path | Yes | ||
| match | No | contains | |
| sheet | No | ||
| backup | No | ||
| dry_run | No | ||
| look_in | No | values | |
| replace | Yes | ||
| formulas | No | ||
| location | No | ||
| allow_loss | No | ||
| match_case | No | ||
| verify_com | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||