Close "hidden" IE after opening an Excel file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am opening generated Excel files in Excel using IE from a web page. This
works fine and Excel comes up. I also get the "hidden" IE instance. It shows
in the task bar, but is off screen and very small. I want this IE instance to
close when I exit the Excel instance it opened. Leaving this open is causing
problems when you do this multiple times. The user can right click and close
this IE instance from the task bar, but they don't always do it.
Since the main web page is is used to generate and display reports as Excel
files, it is normally used repeatedly in a single session. By the time the
user is finished, they have 5-6 instances of these "hidden" IEs in the task
bar.

Thanks
 
Hi Xanthus :-)

You don't mention the version of Windows you are using, but, try the
following and see if it helps:

Tools>Internet Options>Advanced tab>check 'Reuse windows for launching
shortcuts'


Hope this helps.

Jan :)
MS MVP - Windows IE/OE [DTS/AumHa]
Smiles are meant to be shared,
that's why they're so contagious.

Replies are posted only to the newsgroup for the benefit or other readers.
How to make a good newsgroup post:
http://www.dts-l.org/goodpost.htm
 
Thanks Jan, but that is already set.
I am using XP Pro SP2, Office 2003, IE 6.0.2900.2180

The main report page brings up GetReport.asp page when the user selects a
report and clicks the Open button.
GetReport.asp gets the data for the report from SQL Server as XML, then uses
XSLT to produce the output (which is in the variable oNode.text below).
The IE instance window that is created with Excel remains open until I
explicitly close it or the main report window.
I want it to close with the Excel instance and leave the main report web
page up.

Here is what the ASP page basically does to bring up Excel.
Other variables used in the Excel output are formatting or other simple
values, not shown here
-- -----------------------------------
<%
' get data as xml then use xsl.transformNode to get output. then...
%>

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:v="urn:schemas-microsoft-com:vml" >
<head>
<!--[if gte mso 9]>
<xml>
<o:DocumentProperties>
<o:Subject><%=sReportName%></o:Subject>
<o:Author>Created for XYZZ Company</o:Author>
<o:Description>Budget year: <%=nBudgetYear%>
Phase:
<%=sBudgetPhase%>
Approval Status: <%=sApprovalStatus%></o:Description>
<o:Company>XYZ Company</o:Company>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:DownloadComponents/>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->

<%
sPrintArea =
"<x:ExcelName><x:Name>Print_Area</x:Name><x:SheetIndex>1</x:SheetIndex>" & _
"<x:Formula>" & oNode.text & "</x:Formula>" & _
"</x:ExcelName>"
%>

<!--[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name><%Response.Write sXlsSheetName%></x:Name>
<x:WorksheetOptions>
<%Response.Write sPanes%>
<x:FitToPage/>
<x:Print>
<x:FitHeight><%=sFitHeight%></x:FitHeight>
<x:ValidPrinterInfo/>
<x:Scale>51</x:Scale>
<x:VerticalResolution>300</x:VerticalResolution>
</x:Print>
<x:Zoom>75</x:Zoom>
</x:WorksheetOptions>
<x:DataValidation>
<x:Range>A1:A1</x:Range>
<x:InputTitle>Budget Information:</x:InputTitle>
<x:InputMessage>Budget year: <%=nBudgetYear%>
Phase:
<%=sBudgetPhase%>
Approval Status: <%=sApprovalStatus%></x:InputMessage>
</x:DataValidation>
<%= sPageBreak %>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>8835</x:WindowHeight>
<x:WindowWidth>15180</x:WindowWidth>
<x:WindowTopX>120</x:WindowTopX>
<x:WindowTopY>120</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
<%if sRepeatRows <> "" then%>
<x:ExcelName>
<x:Name>Print_Titles</x:Name>
<x:SheetIndex>1</x:SheetIndex>
<x:Formula><%=sRepeatRows%></x:Formula>
</x:ExcelName>
<%=sPrintArea%>
<%end if%>
</xml><![endif]-->
</html>

-- -----------------------------------




Jan Il said:
Hi Xanthus :-)

You don't mention the version of Windows you are using, but, try the
following and see if it helps:

Tools>Internet Options>Advanced tab>check 'Reuse windows for launching
shortcuts'


Hope this helps.

Jan :)
MS MVP - Windows IE/OE [DTS/AumHa]
Smiles are meant to be shared,
that's why they're so contagious.

Replies are posted only to the newsgroup for the benefit or other readers.
How to make a good newsgroup post:
http://www.dts-l.org/goodpost.htm

I am opening generated Excel files in Excel using IE from a web page. This
works fine and Excel comes up. I also get the "hidden" IE instance. It
shows
in the task bar, but is off screen and very small. I want this IE instance
to
close when I exit the Excel instance it opened. Leaving this open is
causing
problems when you do this multiple times. The user can right click and
close
this IE instance from the task bar, but they don't always do it.
Since the main web page is is used to generate and display reports as
Excel
files, it is normally used repeatedly in a single session. By the time the
user is finished, they have 5-6 instances of these "hidden" IEs in the
task
bar.

Thanks
 
Back
Top