Wait until Data loads into Excel

Hi All,
I am working on a project where I first download SAP excel file. Then I am given a Prompt Screen where I enter To and From Period Data. This is monthly range i.e. 202201 to 202202 which is Jan to Feb.
There is another input data i.e. Country. Once all 3 values are passed. I click on Ok.
Now the data is pulled in as per the Period and Country, this takes time. There is Fetching Data pop-up that keeps on coming and going, until the data is loaded.
image

Now I have to wait data to be loaded before saving file as excel.

This is the wait time I want to wait as per the input as it varies as per the date range and country.

I have used onUiElementVanish, but that is not working.

Is there a way we can have a dynamic wait as per the load and once data is loaded, save the file?

Can you please help me, I am working with SAP excel file.

Thanks in advance.

Kind Regards.

Try to use element exist activity

Indicate the excel file in element exist activity

Put that activity inside retry scope set time interval as per your requirement and no of retries as 5

Hope it solves your issue

Thanks
Robin

I feel like this is the most tricky part.

In this case, I would try to find a UI interface element that could be used instead as an indicator that all data is loaded correctly.

Yes, you are right. That is the most tricky part.
Pop-up sometimes appears all time until data is loaded, when data is large, pop-up disappears for few seconds and returns back and this continues until data is loaded.

In terms of UI Element, data is loaded in excel sheet. Once that is done, I update few excel settings and save file with current date and time in specified folder.

So Excel UI element is always present, only change happens is data is loaded.

@Robinnavinraj_S
Thanks for your reply.
Excel is always open, input data is to retrieve specified data.
When I open the downloaded file, file opens are Excel with Data Input screen to retrieve the data.

When Clicked Ok once data is entered. Excel is always open but the pop-up I have mentioned does not have exact waiting time.

Am I correct to assume that the pop-up is part of a macro that runs when you open the file?
One way would be to adapt the macro so that it finishes with a pop-up that reports all is completed.

Another idea would be to create a Do While loop with 5 seconds delays that checks if this element exists and only exits the loop when it wasn’t visible for longer than those 5 seconds. Naturally, the specific timing depends on the typical interval between it disappearing and showing up again.

It looks like using the Delay activity is an unfortunate need in this scenario, but such a loop could at least be a bit more dynamic than setting a single 30-60 seconds delay.

So the way I have achieved it (and sorry for such a late reply, was super busy)

I used Retry Scope activity, Upon a certain Element Exists i.e was Prompts Button under Analysis Tab.
Also increased the amount of Retries in properties to 50. So unitl Analysis Tab is clicked and Prompts Button Appear bot would keep on trying every 5 seconds.
I placed a counter in Retry Scope to monitor how long it tool. The production took around 8 attempts every 5 seconds and pre-pro around 24.

1 Like