Run Macro

Runs a macro of an .xlsm, .xlsb or .xls workbook in Microsoft Excel and returns its result. Needs Excel installed; the workbook's macros run with your rights.

Behaviour

Risk: High · Idempotent: No · Safe to retry: No · Recovery: Not replayed after a crash

Package Excel activities Velophex.Excel.Activities 0.7.1-rc.7 · Supported (Core profile) · type id velophex.excel.desktop.runMacro

Properties#

Input#

Workbook Path#

WorkbookPath · String · Required · Default: Not specified in package metadata

The .xlsx, .xlsm, .xlsb or .xls file. Relative paths resolve against the project folder.

Macro Name#

MacroName · String · Required · Default: Not specified in package metadata

The macro, optionally with its module.

Arguments#

Arguments · IReadOnlyList<Object> · Optional · Default: Not specified in package metadata

Values passed to the macro's parameters, in order (at most 30).

Options#

Save Changes#

SaveChanges · Boolean · Optional · Default: True

Save the workbook after the macro.

Output#

Result#

Result · Object · Output

The macro function's return value, or null for a Sub.

Retry and risk#

This activity is not marked safe to retry: if it fails partway, check whether its work already happened before running it again. If a run is interrupted and the outcome of a step is unknown, the step is never retried automatically (what to do). How activities declare this: characteristics, retries and risk.

Every activity also has the engine's common properties: Timeout and Continue On Error.

Generated from Velophex.Excel.Activities 0.7.1-rc.7. Category: Excel Desktop. Keywords: excel, macro, vba, run, xlsm, desktop, automation.

Properties

Input

Options

Output

Retry and risk

Related activities