Page 1 of 1

Wait On Excel File to Load Before Saving and Closing

Posted: Thu Nov 01, 2018 6:47 pm
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!

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

Posted: Fri Nov 02, 2018 8:49 am
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

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

Posted: Fri Nov 02, 2018 8:56 am
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"

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

Posted: Fri Nov 02, 2018 12:16 pm
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.

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

Posted: Fri Nov 02, 2018 12:29 pm
by Oleg
Just a tip: I have a "wait for pixel" command for exactly this situation.
This is good solution too.

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

Posted: Fri Nov 02, 2018 10:03 pm
by chris.james
Thank you both!

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

Posted: Mon Nov 05, 2018 12:49 pm
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.

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

Posted: Tue Nov 06, 2018 12:58 pm
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