How to click on the screen during excel macro execution?

excel
activities
studio
#1

So I am performing the activity ‘execute macro’ inside an excel application scope but the macro is taking too long to execute. It starts executing then slowly calculate for every sheet some values and if a user randomly just clicks over the screen at that time i.e. during excel execution, the macro runs considerably faster. How can I achieve the random click using the bot?

#2

Use Click activity. Given any one selector of UI element available on the screen.

You can use offset cursor position to click of given UI element.

Regards,
Karthik Byggari

#3

There is something wrong with your macro. This needs to be corrected, not to work for an workaround.

#4

The thing is I am not authorised to change or edit the macro in any way. My task is to automate the whole process. If a user manually runs the macro it runs faster in comparison to the bot running the same. The difference I found is that if a user runs the macro he/she would randomly sometime click the screen and the macro starts working faster but the bot cannot do that. It results in drastically long times for example 20-25 mins for a file which would have taken 10 mins otherwise

#5

Any automation starts with the analysis and optimization of the process.

  1. Can you provide the your flow and the excel file?
  2. How do you start the macro from UiPath?
  3. Why do you say the bot can not click the Excel while running the macro?
#6

I can explain the flow. So essentially I open an excel file using start process. Then after doing some processing, I use excel application scope over the same file and use activity Execute Macro.
The reason I say that the bot cannot click the excel while running the macro. As when the macro starts executing, it runs for a long time. I tried keeping a click activity in parallel, in the way suggested by @KarthikByggari and ran it in debugging mode. The logs indicated that it starts both the click as well as the macro execute together but the bot actually performs the click only after the maco has been fully executed.

**I can’t upload files. Sorry about that.

#7

Parallel works fine. Put a sequence that repeats for 100 times in which you click and write the index. This is how you can check that it works in parallel with the macro execution.

1 Like
#8

Is there a way by which I can just provide an onscreen location for the bot to click on the screen regardless of what’s on the screen.
Using click in parallel failed as the clicks occurred after macro execution is completed.