How to Dismiss Excel Find And Replace Result Message Box

excel
activities
studio

#1

emphasized text
Hello all,

What I’m achieving:

  1. Open any Excel file
  2. Ctrl - H (Find and Replace)
  3. Find any available character, Replace All
  4. Dismiss the message box “xx words are found and replaced” (click OK button)

The problem:
After clicking Replace All button, I cannot click the OK button. It’s not the click failed or timeouted, but it is never executed. It seems like UiPath is waiting for the message box to be dismissed so Excel can be available, while Excel waits for the message box to be dismissed, so (by UiPath or human) to be available it’s kinda waiting for each other.

Does anybody know how to resolve this?

The message box (it is in Japanese, but it is the message box of Replace All results).

The capture of code: (in this case, the Message Box “Hello” never showed up)

And the code itself:
test.xlsx (7.8 KB)
Test.xaml (11.4 KB)


#2

Hi @whyyouandi
You Can use Excel application scope and do the manipulations

Thanks
Ashwin.S


#3

Hello @AshwinS2, thank you for your reply.
I tried too using Excel Application Scope but it has the same result.
The actions after won’t be executed unless the message box is dismissed.
And the action to dimiss the message box is located after the replace.


#4

hi @whyyouandi

Can you show me the selector for OK Button

Thanks
Ashwin S


#5

@whyyouandi Instead of using message box you can use call out actvity


#6

Hello @whyyouandi,

Please use attachment.
test.xaml (9.9 KB)
test.xlsx (8.1 KB)

Thanks,
Pankaj


#7

Hello @AshwinS2, the selector was not the problem. Even when I tried with another activity, it just won’t go there.


#8

Hoopps. Seems I explain my question badly.
I don’t think it will have any change in changing my Message Box to Call Out (it is just example anyway).
But thank you for your idea :slight_smile:


#9

It is working @Pankaj.Patil , thank you!
If it’s fine with you, could you kindly explain why it wasn’t working?

Using your code as reference, I stopped using both Excel Application Scope or Attach Window, but can’t get a grasp what was wrong.


#10

Hello @whyyouandi,

at me, when my bot was clicking on button Replace All. sometimes dialog box was coming and sometimes not. I also tried both attach browser and excel application scope. but no luck.
I found this beautiful way.

Thanks,
Pankaj


#11

Sorry for the late reply. Thank you @Pankaj.Patil :slight_smile: