Wait On Excel File to Load Before Saving and Closing

Discuss RoboTask here
Post Reply
chris.james
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Wait On Excel File to Load Before Saving and Closing

Post by chris.james »

I have a task setup to open an Excel spreadsheet (using the Run program/Open Document because it's a .xlsm and I couldn't get it to work using the open excel command). I need to introduce a delay after it sends the command to open the spreadsheet in order to allow it to fully load before doing some other steps in the task. It opens the spreadsheet just fine, but the task terminates almost immediately because it says the window can't be found. I have it set to "wait until the application is ready for input", but it still tries to run the additional steps immediately. Any help you can give me would be greatly appreciated!
Thanks!
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Wait On Excel File to Load Before Saving and Closing

Post by Oleg »

Put some pause before next steps. I think that the pause 1-2 seconds is enough.
look at the action Pause
This is simplest way.

"Ready for Input" means that application is running and it can response on some system messages or events.
But this doesn't guarantee that document is loaded completely and prepared for next work.

Also you can try Wait for window
Oleg Yershov
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Wait On Excel File to Load Before Saving and Closing

Post by Oleg »

Also pay attention that the target window can change own caption on some conditions.
You have to use only permanent part of the caption. For example "Microsoft Excel"
Oleg Yershov
Rukbunker
Posts: 192
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Wait On Excel File to Load Before Saving and Closing

Post by Rukbunker »

Just a tip: I have a "wait for pixel" command for exactly this situation.
In my case, I wait until the "format pointer" icon appears on the screen. This appears (in most of the cases) as last on the screen together with the rest.
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Wait On Excel File to Load Before Saving and Closing

Post by Oleg »

Just a tip: I have a "wait for pixel" command for exactly this situation.
This is good solution too.
Oleg Yershov
chris.james
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Wait On Excel File to Load Before Saving and Closing

Post by chris.james »

Thank you both!
WardKin
Posts: 1
Joined: Mon Oct 29, 2018 10:28 am

Re: Wait On Excel File to Load Before Saving and Closing

Post by WardKin »

I don't understand. How do you set up the "wait for pixel" command? Sounds very useful but I'm not sure how to set it up.
Here's a top notch review of SnoreRX to read.
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Wait On Excel File to Load Before Saving and Closing

Post by Oleg »

I don't understand. How do you set up the "wait for pixel" command? Sounds very useful but I'm not sure how to set it up.
This is standard operation.
You can wait some pixel (or set of pixels) on some window or screen.
When some program finish an operation it shows some message or picture on screen
Oleg Yershov
Post Reply