Can we run Macros in excel automation?

please guide.
thank u.

@Priyanka_Kumari - there is no “Run macros” action in the RPA Recorder action library right now, but you can run a macros through Excel interface.

How ? Please explain.

@edacosta you can open open Exel file and run macros using mouse clicks and keystrokes.

Thanks, @ashapkina!

One more question :

Can I use clicks and keystrokes when I open the excel file in background?

No, the bot will need to interact with the file’s UI so all elements that the bot clicks on have to be visible on the screen. And the window has to be active for the keystrokes to work.

If it’s a simple macro that you run once then you can set it to run on “Open” and the immediately close the file and do other actions in the background.

I do this, for example, with a macro to count the number of mails in an inbox.

  • Win +R
  • “file path”
  • Macro runs on open
  • Close file
  • other actions in the background

Depends on your use case of course though.

1 Like