Hi, I am running a test which calls lots of external action. At the end, it leaves lots of excel process open (5-8). before running test again, i need to close all excel file from task manager.
I tried systemutil.CloseProcesByName
and Exl.DisplayAlets = False
but its not helping as it opens excel pop-up window (DW20.exe).
I am using Excel 2007.
I need a function which i can call in beginging of test to call all excel process without any excel pop-up.
check below link... http://www.sqaforums.com/showflat.ph...e=1#Post713501
i have never seen bugs sleeping
taskkill /f should work as given in that thread.
But I think a better way to do this is to simply close the excel workbooks properly after you're done with them in your test. Save the taskkill as a backup method in case of test failure/abortion.
If you close all the workbooks properly (Save followed by Close) and call the excel.Quit method your process should not be dangling ideally
thnx all for replying..
i am calling few actions which are read only for us, so we cant apply exl.quit in those actions.
problem I face here is whenever I kill any excel process, it opens excel pop-up window asking "Do you want to recover". process name of this pop-up is "DW20.exe"
ultimately it opens 5-6 pop-ups [img]/images/graemlins/frown.gif[/img]
Yeah that's where the taskkill /f (force kill) would kill it without popups.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'Excel.exe'")
For Each objProcess in colProcesses