Script to open an excel file and exit

Several scripts
Post Reply
User avatar
dkaris
Nouveau
Nouveau
Posts: 27
Joined: 10 Nov 2008 12:00

Script to open an excel file and exit

Post by dkaris » 15 May 2010 9:27

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

baralem

Post by baralem » 17 May 2010 12:15

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

User avatar
dkaris
Nouveau
Nouveau
Posts: 27
Joined: 10 Nov 2008 12:00

Post by dkaris » 17 May 2010 12:54

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

User avatar
zlatan24
Nouveau
Nouveau
Posts: 2
Joined: 27 Feb 2011 12:00

Post by zlatan24 » 27 Feb 2011 9:27

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.

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 03 Mar 2011 9:24

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

Post Reply