Running macros
In this section, we will learn about running Excel macros. The sample file has a macro called procFilterSegment
. This macro will filter the Segment
column by the given argument. In the following walk-through, the bot will open the sample workbook in read-only mode and run this macro. We will send an Enterprise
argument to the macro. This should result in the bot applying a filter of Enterprise
to the Segment
column.
Let's start this walk-through by executing the following steps:
- Log into Control Room.
- Create a new bot and call it
Chapter11 – Excel Macro
in the\Bot\
folder. - Starting with the comments, add a new Comment action as
"---------------------"
on line 1 and click on Save. - Add a new Comment action as
"------- Open Excel Worksheet"
on line 2 and click on Save. - Add a new Comment action as
"------- Run Macro"
on line 3 and click on Save. - Add a new Comment action as
"------------------...