replace_in_sheet
Find and replace text across an entire worksheet, returning the number of cells changed. Handles merged and hidden cells like Excel.
Instructions
Find and replace text across a whole worksheet (substring match per cell by default). Returns the number of cells changed. Uses findAll so merged/hidden cells behave like the Excel UI.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"find": "<find>",
"replace": "<replace>"
},
"name": "replace_in_sheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | Text to find. | |
| replace | Yes | Replacement text. | |
| matchCase | No | Case-sensitive search. Default false. | |
| sheetName | No | Worksheet name. Defaults to the active worksheet. | |
| workbookId | No | Target workbook ID from list_workbooks. Optional when only one workbook is connected. | |
| completeMatch | No | Match the entire cell contents. Default false. |