To automate few excel tasks, we might sometimes consider macros during our RPA implementation.
let’s see how to execute a macro through UiPath…!!!
Example
Implementation using UiPath :
Let us implement a workflow to create serial numbers in excel file according to the user using a macro code.
(Please ignore the macro code if you don’t understand it, because our goal here is to learn the integration rather than the macro code)
Macro(File has been attached in the source code- Open the excel file and press ALT+11 key to display the macro):
***(This code will create the serial numbers starting from the active cell)
Step 1:
Drag “Input Dialogue Box” activity into the designer panel and store the user provide data into a variable.
Step 2:
Drag “Excel application scope” activity into the designer panel and pass the excel file to it which contain the macro code in it.
Step 3:
Drag “Execute macro” activity into the designer and supply the Macro Name and Macro Parameters to it.
Here:
MicroName: “AddSerialNumbers”Â
MacroParameters: {userInput} (The function here accepts only one argument)
Step 4:
Finally, execute the workflow 🙂
Click here to download the Source Code…
Hope it has helped you…