run_macro
Execute a VBA macro in Excel and retrieve the result. Supports passing arguments and specifying a workbook.
Instructions
Run a VBA macro in Excel and return its result.
Args: macro_name: Macro name (e.g. 'MyMacro' or 'Module1.MyMacro'). workbook: Workbook name. If omitted, Excel resolves globally. args: Optional arguments to pass to the macro.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macro_name | Yes | ||
| workbook | No | ||
| args | No |