Last post Jan 23, 2006 09:40 PM by treachon
Jan 23, 2006 09:40 PM|treachon|LINK
All the gurus out there, all the MCP all the MVP and the elites i need you help. :)
Ive been figuring out how to terminate the excel process and i still am having problems. Here is the scenario:
I need to kill the excel process particular to a file.
Ive Categorize the following resolutions
1. Terminate excel having a window service (so that i can get the title in the title bar of the window)
1.A. Use TaskKill.exe - This is the best possible solution i have (since the web app is in Win2k3).
Using this i just can use shell command in webapp and execute the command
specifiying the window title of the open excel file as a parameter. But the problem is
in Win2k3 multiple users, the excel does not open as a window service (with window) even though
ive already configured the IIS Admin property to "Allow users to interact with desktop".
It is a because of Interactive Services issues. a service executed as a LocalSystem account
is the only one that can display a window, which a web app does not use that account.
1.B. Use WinAPI - Same problem with letter 1.A
2. Terminate excel not having a window service (a window)
A. Use GetProcess of System.Diagnostic namespace - can not kill a process particular to an open excel file.
B. USe WinAPI - I dont know if we can make the excel process visible.
C. Use TaskKill.exe - We can not use windowtitle as a parameter since we dont have a window.
Is there any other way to kill the excel process particular to the opened excel file having the two scenario. But im looking forward
for No. 2 since i cant make the excel window display in the task list of the taskmanager. But if there are ways to make it visible
then TaskKill is just the answer.