Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel created with activexobject("excelapplication") does not close

Status
Not open for further replies.

luzifer

Technical User
Mar 18, 2002
4
US
Hi there!

i did post this in javascript forum, but didnt get any response so i try it here.

I´m quite new into Javascript and ActiveX, so my problems are even bigger :)
Here´s what i wanna do:
i´m about to create a little intranetpage with a lot of links to excel and word files. those files should open in Word and Excel, not in Internet Explorer!
i managed this. (script below) and with word everything is ok. but excel is givin me some serious headaches.
the Excel files do open in Excel, but first curios thing is u got to leave the file extension '.xls' out of the path. (but thats not a prob as the files do open!)
but where the problem realy kicks in is after closing Excel, cause excel is still runing in background as a prozess (<- dont know the proper expression, it is still shown in task manager in the second sheet) and u do have to remove it manually from there.
ok. enough foreplay, we are using NT 4.0 and IE 5.0
and heres the script:
<script language=&quot;javaScript&quot;>
function startExcel(strFile)
{
var objExcel;
objExcel = new ActiveXObject(&quot;Excel.Application&quot;);
if (objExcel != null)
{
objExcel.Visible = true;
objExcel.workbooks.Open(strFile);
}
}
</script>

then i refer to it with href=&quot;javascript:startExcel('file:///.....')&quot;
any suggestions here??
as i said, the files do open in excel, but they dont close properly!
thnx in advance

chris

some amusement: i managed the whole problem with VBScript, but then some1 told me that VBScript will not run on all machines and i cant to it like that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top