944,168 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 414
  • Python RSS
Oct 16th, 2009
0

Check for Excel session

Expand Post »
Hi Friends,

I need to write a piece of code to identify if an Excel session(the process which is listed in the Task Manager) is already running or not?. Can anyone guide me with this?

Any help will be much appreciated!

Regards,
Dinil
Similar Threads
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008
Oct 16th, 2009
0
Re: Check for Excel session
I don't know but If you can mess with tasklist and subprocess module (for XP/VISTA). This is purely untested as I'm not sure if tasklist returns anything!
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Oct 16th, 2009
0
Re: Check for Excel session
You can pipe top to a file on Linux and then read the file.

Apparently you can use WMI for MS WIndows but I have not used it http://timgolden.me.uk/python/wmi_co...ning_processes
Reputation Points: 741
Solved Threads: 694
Nearly a Posting Maven
woooee is offline Offline
2,314 posts
since Dec 2006
Oct 26th, 2009
0
Re: Check for Excel session
Hi got a nice piece of code from this site:
http://code.activestate.com/recipes/303339/

I am now able to check if an Excel process is running or not. The code does not use WMI and works fine on Windows ....

Thanks for the help!!!....

Thanks and Regards,
Dinil
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Throttle CPU usage
Next Thread in Python Forum Timeline: Is this an OO program?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC