ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Closing Excel Instance (https://www.excelbanter.com/excel-programming/336026-closing-excel-instance.html)

harkit[_2_]

Closing Excel Instance
 

Hi

I am Rajesh

I want to display an Excel file <file.xls in Internet Explorer 6.0.
am currently displaying the xls file in the browser using javascrip
code in the click event of a button.

The problem is that when I close the browser, the excel instanc
remains in the list of processes in Task Manager.

Please help me how I can close that instance. Any suggestion or hin
will be of great help to me.

Thanks in Advance
Rajes

--
harki
-----------------------------------------------------------------------
harkit's Profile: http://www.excelforum.com/member.php...fo&userid=2576
View this thread: http://www.excelforum.com/showthread.php?threadid=39179


Tom Ogilvy

Closing Excel Instance
 
This usually is caused by creating a reference to Excel which is not
released. This can be done by using a construct like

xlapp.ActiveSheet.Sort Range("A1")

where the reference to cell A1 is not fully qualified.

xlApp.Activesheet.Sort xlapp.ActiveSheet.Range("A1")
would be the proper way to do it.

If you are only displaying the sheet, then perhaps this is not applicable -
but you may otherwise not be releasing your reference.

--
Regards,
Tom Ogilvy


"harkit" wrote in
message ...

Hi

I am Rajesh

I want to display an Excel file <file.xls in Internet Explorer 6.0. I
am currently displaying the xls file in the browser using javascript
code in the click event of a button.

The problem is that when I close the browser, the excel instance
remains in the list of processes in Task Manager.

Please help me how I can close that instance. Any suggestion or hint
will be of great help to me.

Thanks in Advance
Rajesh


--
harkit
------------------------------------------------------------------------
harkit's Profile:

http://www.excelforum.com/member.php...o&userid=25764
View this thread: http://www.excelforum.com/showthread...hreadid=391796




LoodS

Closing Excel Instance
 
If you created the Excel instance as an object you have to destroy the object
when you're done with it. In VBScript it would have been something like "Set
myApp = Nothing". Hope this helps.
--
<vba-programmerLoodS</vba-programmer


"harkit" wrote:


Hi

I am Rajesh

I want to display an Excel file <file.xls in Internet Explorer 6.0. I
am currently displaying the xls file in the browser using javascript
code in the click event of a button.

The problem is that when I close the browser, the excel instance
remains in the list of processes in Task Manager.

Please help me how I can close that instance. Any suggestion or hint
will be of great help to me.

Thanks in Advance
Rajesh


--
harkit
------------------------------------------------------------------------
harkit's Profile: http://www.excelforum.com/member.php...o&userid=25764
View this thread: http://www.excelforum.com/showthread...hreadid=391796



smr78[_3_]

Closing Excel Instance
 


"Tom Ogilvy" wrote:

This usually is caused by creating a reference to Excel which is not
released. This can be done by using a construct like

xlapp.ActiveSheet.Sort Range("A1")

where the reference to cell A1 is not fully qualified.

xlApp.Activesheet.Sort xlapp.ActiveSheet.Range("A1")
would be the proper way to do it.

If you are only displaying the sheet, then perhaps this is not applicable -
but you may otherwise not be releasing your reference.

--
Regards,
Tom Ogilvy


"harkit" wrote in
message ...

Hi

I am Rajesh

I want to display an Excel file <file.xls in Internet Explorer 6.0. I
am currently displaying the xls file in the browser using javascript
code in the click event of a button.

The problem is that when I close the browser, the excel instance
remains in the list of processes in Task Manager.

Please help me how I can close that instance. Any suggestion or hint
will be of great help to me.

Thanks in Advance
Rajesh


--
harkit
------------------------------------------------------------------------
harkit's Profile:

http://www.excelforum.com/member.php...o&userid=25764
View this thread: http://www.excelforum.com/showthread...hreadid=391796

Hi,
You also can try these tips :
- if your Excel file is displayed in an Frame or Iframe, clean the Frame by
frame.location="about:blank";
- try the CollectGarbage method like this (found in an other javascript
newsgroup post)

excelapp = new ActiveXObject("Excel.Application");
......
excelapp.workbooks(exlfilenames).Close(); // for all workbooks
excelapp.Quit();excelapp=null;
idTmr = window.setInterval("Cleanup();",5);

function Cleanup() {
window.clearInterval(idTmr);
CollectGarbage();
window.close();
}
--------
Regards


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com