Check for Excel session

Thread Solved

Join Date: Feb 2008
Posts: 198
Reputation: dinilkarun is an unknown quantity at this point 
Solved Threads: 0
dinilkarun dinilkarun is offline Offline
Junior Poster

Check for Excel session

 
0
  #1
Oct 16th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,357
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso
 
0
  #2
Oct 16th, 2009
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!
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,008
Reputation: woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough 
Solved Threads: 285
woooee woooee is offline Offline
Veteran Poster
 
0
  #3
Oct 16th, 2009
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
Linux counter #99383
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 198
Reputation: dinilkarun is an unknown quantity at this point 
Solved Threads: 0
dinilkarun dinilkarun is offline Offline
Junior Poster
 
0
  #4
33 Days Ago
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC