Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Excel - New Instance JMay Excel Discussion (Misc queries) 4 November 28th 09 04:55 PM
Closing VB triggers closing Excel Minilek Excel Programming 2 August 6th 04 05:17 PM
Excel Instance FuzzyLogic Excel Programming 2 February 21st 04 03:41 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


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

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"