Page 1 of 1

Script to open an excel file and exit

Posted: 15 May 2010 9:27
by dkaris
Hello group,

I am trying to write a script that will open an excel file and exit simply leaving the excel running.



So far I have not made it since it seems that the agent waits for the excel process to end so as to continue with the rest of the script and exit. This means that the task remains yellow until I manually close the excel file.



Any ideas about how to do something like that?



Regards

Dimitris

Posted: 17 May 2010 12:15
by baralem
Try setting parameter "Job children inside job object" = N using ctmwincfg utility. Be aware that it could affect existing jobs execution so you should test it first.

Job children inside job object:
Flag that specifies if procedures invoked by a job can be run outside the Job Object. If so, this prevents a situation in which the original job remains in executing mode until the invoked procedure completes.
N – All procedures invoked by the job are run outside the job object.
Y – All procedures invoked by the job are run inside the job object. Default.

regards
martin

Posted: 17 May 2010 12:54
by dkaris
From CCM in the agent properties under the Job Submission and Tracking, I have set the "Wait for child processes to complete" option to "No"

In my batch file I start the excel with the start command....


It works ok for me.


Regards

Dimitris Karistinos

Posted: 27 Feb 2011 9:27
by zlatan24
dkaris wrote:From CCM in the agent properties under the Job Submission and Tracking, I have set the "Wait for child processes to complete" option to "No"

In my batch file I start the excel with the start command....


It works ok for me.


Regards

Dimitris Karistinos
My experience as concerns ms excel is quite wide. Once I had similar trouble and could resolve it with the aid of one tool. It showed me one of its resources such as quick and intelligent recovery of corrupted worksheets in xltm, xlsx, xlt, xls, xlsm, xlam and xltx formats and what is more I knew that is would help with some kind of problems too - repair and fix Excel files.

Posted: 03 Mar 2011 9:24
by mauriziog
Consider that if you change the option:
"Job children inside job object" = N
you do this for all processes run on that agent.

You can execute the execel program using not the "call" method but the "start" one. "Start" dont waits the children end or status as the case described.
Have a good day
MaurizioG