Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Inactive or incorrectly terminated Excel process images

Situation: Inactive or incorrectly terminated Excel process images accumulate
on server

Anyone out there with knowledge/advice on how to access a hung(?) instance
of Excel and pull information about the calling event or anything else that
may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Inactive or incorrectly terminated Excel process images

Nothing simple that I know of. Do you have code that creates instances of
Excel (through C++, C#, VB, VBA)? If the developer does not close the
inststance prior to setting the object to Nothing then the instance will be
stuck...

dim objXL as object
set objXl = CreateObject("Excel.Application")
'do some stuff
objXL.close 'necessary to remove the instance of Excel
set objXl = nothing
--
HTH...

Jim Thomlinson


"JB2005" wrote:

Situation: Inactive or incorrectly terminated Excel process images accumulate
on server

Anyone out there with knowledge/advice on how to access a hung(?) instance
of Excel and pull information about the calling event or anything else that
may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Inactive or incorrectly terminated Excel process images

Rogue code is our chief suspect, but we're experiencing difficulties in
identifying candidates...

"Jim Thomlinson" wrote:

Nothing simple that I know of. Do you have code that creates instances of
Excel (through C++, C#, VB, VBA)? If the developer does not close the
inststance prior to setting the object to Nothing then the instance will be
stuck...

dim objXL as object
set objXl = CreateObject("Excel.Application")
'do some stuff
objXL.close 'necessary to remove the instance of Excel
set objXl = nothing
--
HTH...

Jim Thomlinson


"JB2005" wrote:

Situation: Inactive or incorrectly terminated Excel process images accumulate
on server

Anyone out there with knowledge/advice on how to access a hung(?) instance
of Excel and pull information about the calling event or anything else that
may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Inactive or incorrectly terminated Excel process images

It's like asking a bunch of kids who made the mess. The mess is obvious, but
who made the mess is not... I wish I could help.
--
HTH...

Jim Thomlinson


"JB2005" wrote:

Rogue code is our chief suspect, but we're experiencing difficulties in
identifying candidates...

"Jim Thomlinson" wrote:

Nothing simple that I know of. Do you have code that creates instances of
Excel (through C++, C#, VB, VBA)? If the developer does not close the
inststance prior to setting the object to Nothing then the instance will be
stuck...

dim objXL as object
set objXl = CreateObject("Excel.Application")
'do some stuff
objXL.close 'necessary to remove the instance of Excel
set objXl = nothing
--
HTH...

Jim Thomlinson


"JB2005" wrote:

Situation: Inactive or incorrectly terminated Excel process images accumulate
on server

Anyone out there with knowledge/advice on how to access a hung(?) instance
of Excel and pull information about the calling event or anything else that
may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Inactive or incorrectly terminated Excel process images

Hi JB,

This is why MS doesn't advocate running Excel on a server. It's too easy to
leave orphaned instances hanging around, which, as you know, will cause
problems as they chew up more and more memory.

One thing you can try is to execute this vbscript code:

ShowExcelApp

Sub ShowExcelApp()
Dim obj

Set obj = GetObject(, "Excel.Application")
obj.Visible = True

Set obj = Nothing
End Sub

Just put this code in a text file and name it getexcel.vbs. You should then
be able to execute it on the server with wscript or maybe by double-clicking
the icon. It should grab one orphaned instance and make it visible, thus
enabling you to see what state the application is in. Likely, you'll see
that an unanswered error message or prompt is keeping Excel from closing.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


JB2005 wrote:
Situation: Inactive or incorrectly terminated Excel process images
accumulate on server

Anyone out there with knowledge/advice on how to access a hung(?)
instance of Excel and pull information about the calling event or
anything else that may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Inactive or incorrectly terminated Excel process images

Does that grab an orphaned instance or does it grab any instance orphaned or
not...What happens if you grab an active instance? Just idle curiosity on my
part...
--
HTH...

Jim Thomlinson


"Jake Marx" wrote:

Hi JB,

This is why MS doesn't advocate running Excel on a server. It's too easy to
leave orphaned instances hanging around, which, as you know, will cause
problems as they chew up more and more memory.

One thing you can try is to execute this vbscript code:

ShowExcelApp

Sub ShowExcelApp()
Dim obj

Set obj = GetObject(, "Excel.Application")
obj.Visible = True

Set obj = Nothing
End Sub

Just put this code in a text file and name it getexcel.vbs. You should then
be able to execute it on the server with wscript or maybe by double-clicking
the icon. It should grab one orphaned instance and make it visible, thus
enabling you to see what state the application is in. Likely, you'll see
that an unanswered error message or prompt is keeping Excel from closing.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


JB2005 wrote:
Situation: Inactive or incorrectly terminated Excel process images
accumulate on server

Anyone out there with knowledge/advice on how to access a hung(?)
instance of Excel and pull information about the calling event or
anything else that may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Inactive or incorrectly terminated Excel process images

Jim,

That will grab any instance. I'm not sure what determines which instance is
"next" in the order. Keep in mind that Windows (or Excel for that matter)
doesn't know that a particular instance of Excel is orphaned. Probably best
to run this script during a slow time of day so the chances are good that
the instance shown will be one that's orphaned.

I'm sure that with the Windows API you could enumerate the current
processes, find ones named EXCEL.EXE, look for the longest running one, and
then activate and show the application window that corresponds to it. But
that's a lot tougher than a call to GetObject. <g

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


Jim Thomlinson wrote:
Does that grab an orphaned instance or does it grab any instance
orphaned or not...What happens if you grab an active instance? Just
idle curiosity on my part...

Hi JB,

This is why MS doesn't advocate running Excel on a server. It's too
easy to leave orphaned instances hanging around, which, as you know,
will cause problems as they chew up more and more memory.

One thing you can try is to execute this vbscript code:

ShowExcelApp

Sub ShowExcelApp()
Dim obj

Set obj = GetObject(, "Excel.Application")
obj.Visible = True

Set obj = Nothing
End Sub

Just put this code in a text file and name it getexcel.vbs. You
should then be able to execute it on the server with wscript or
maybe by double-clicking the icon. It should grab one orphaned
instance and make it visible, thus enabling you to see what state
the application is in. Likely, you'll see that an unanswered error
message or prompt is keeping Excel from closing.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


JB2005 wrote:
Situation: Inactive or incorrectly terminated Excel process images
accumulate on server

Anyone out there with knowledge/advice on how to access a hung(?)
instance of Excel and pull information about the calling event or
anything else that may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Inactive or incorrectly terminated Excel process images

You best bet is to fix the dodgy code, but as Jake pointed, excel is not
supposed to be run like this.
Probably due to the use of unqualified object that are not released, so
error state not properly handled.

Process Explorer from SysInternals will tell you which files are being used
by each Excel instance. may help track down the culprit.

If you feel you want to automate it, rather than actually fix the cause:
http://www.thescarms.com/vbasic/StopProcess.asp

NickHK

"JB2005" wrote in message
...
Situation: Inactive or incorrectly terminated Excel process images

accumulate
on server

Anyone out there with knowledge/advice on how to access a hung(?) instance
of Excel and pull information about the calling event or anything else

that
may help identify the root cause?

Any auditing techniques out there that can record such events?

Your help much appreciated.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can password be removed on Excel WS from terminated employee? pb Excel Discussion (Misc queries) 5 September 8th 06 08:12 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM
Excel.exe not terminated after spreadsheet saved Zachary Hilbun Excel Programming 0 July 8th 04 09:45 PM
Excel Process is not terminated when using C# and com Interrop Hendrix4578 Excel Programming 1 June 27th 04 07:31 AM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"