Execute Macro
This activity helps to run a macro which is written inside the excel.
Technical Reference:
|
INPUT |
MethodName: Specify the macro method name used inside the excel file. |
MISC |
Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes. |
|
SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False” True: Continues to execute the workflow irrespective of any error thrown. False: Stops the workflow if it throws any error |
||
Version: It specifies the version of the excel automation feature in use |
||
OUTPUT |
Result: Define a Boolean value to validate the success state of the activity. |
*Mandatory field to execute the workflow
The following activity illustrates on how we can use the Execute macro activity to run a macro method inside an excel file. Here we will be using a macro file to run the method “TestMacro” inside the excel file. This method copies the data from sheet1 to sheet2.
Example:
1. Drag and drop a get excel object activity to the workflow.
2. Enter the file path of the macro excel file in which the macro method is written.
3. Drag and drop a Execute macro activity into the Get Excel object activity.
4. Click on the Execute macro activity.
5. Specify the macro method name to be executed.
6. Execute the activity.
The bot executes the activity, runs the given macro method, and copies the data from sheet1 to sheet 2 of the macro file given.