run_macro
Run a VBA macro in an Excel workbook by specifying the macro name and optional arguments; the workbook is saved and session reloaded to reflect changes.
Instructions
Run a VBA macro in the workbook via Excel, then reload the session so changes the macro made are visible to the other tools.
Only .xlsm workbooks can hold macros. macro_name is the procedure name (e.g. 'FormatReport' or 'Module1.FormatReport'); args are passed through. The workbook is saved after the macro runs. Requires Microsoft Excel on Windows (uv sync --extra com), and macros must be trusted for automation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| macro_name | Yes | ||
| session_id | Yes |