Has anyone else encountered a similar problem or found a soln. to this?
I have a piece of Javascript to open an Excel workbook that is sitting on an Oracle application server. I want the workbook to be opened inside the browser but it opens in a separate instance of Excel. I have read a technet
article (Q162059) which guides you thro' the options that need to be set via file types in Windows Explorer. However, even when the Browse in Same Window option is checked (which is the default anyway) the workbook fails to open inside the browser.
I am running IE5, Office 2000, and my OS is Win2000. Any hints? I've pasted the javascript below in case it's at fault.
(I will however, need a method that will work on different platforms with different combinations of client s/w eg: Win 95, 98, 00, NT4*; IE4, 5; Office97, 00).
* according to the technet article you need to 'hack' the registry to get this to work on NT - I certainly hope this isn't the case altho' when I looked at the file type options on an NT machine it did not have a browse in same window option :-(
Thanks in advance
Karpy
Javascript :
CREATE OR REPLACE PACKAGE p_ebb_whatif AS
PROCEDURE call_whatif(
in_session_id IN t_ebb_session.session_id%TYPE );
END p_ebb_whatif;
/
show errors
CREATE OR REPLACE PACKAGE BODY p_ebb_whatif AS
PROCEDURE javascript
IS
BEGIN
htp.print('function fnOpenExcelThing(iSessionID) ');
htp.print('{ ');
htp.print(' var oExcel = new ActiveXObject("Excel.Application" ');
htp.print(' var vPath = "F:\\dev\\andytemp\\WhatIf.xls"; ');
htp.print(' var oBook = oExcel.Workbooks.Open(vPath); ');
htp.print(' var oSheet = oBook.Worksheets.Add(); ');
htp.print(' // Data ');
htp.print(' oSheet.Cells(1, 1) = iSessionID; ');
htp.print(' // Call the function to monkey with the results ');
htp.print(' // oExcel.Run("subFormat" ');
htp.print(' // Let the user see the application ');
htp.print(' oExcel.Visible = true; ');
htp.print(' // Give the user the control of the application ');
htp.print(' oExcel.UserControl = true; ');
htp.print(' } ');
END;
PROCEDURE call_whatif(
in_session_id IN t_ebb_session.session_id%TYPE )
IS
BEGIN
htp.print('<HTML> ');
htp.print(' <HEAD> ');
htp.print(' <SCRIPT LANGUAGE="JavaScript"> ');
javascript;
htp.print(' </SCRIPT> ');
htp.print(' </HEAD> ');
htp.print(' <BODY onload="fnOpenExcelThing(');
htp.print(in_session_id);
htp.print(');">');
htp.print('<DIV>Loading...</DIV></BODY></HTML>');
END call_whatif;
END p_ebb_whatif;
/
show errors
I have a piece of Javascript to open an Excel workbook that is sitting on an Oracle application server. I want the workbook to be opened inside the browser but it opens in a separate instance of Excel. I have read a technet
article (Q162059) which guides you thro' the options that need to be set via file types in Windows Explorer. However, even when the Browse in Same Window option is checked (which is the default anyway) the workbook fails to open inside the browser.
I am running IE5, Office 2000, and my OS is Win2000. Any hints? I've pasted the javascript below in case it's at fault.
(I will however, need a method that will work on different platforms with different combinations of client s/w eg: Win 95, 98, 00, NT4*; IE4, 5; Office97, 00).
* according to the technet article you need to 'hack' the registry to get this to work on NT - I certainly hope this isn't the case altho' when I looked at the file type options on an NT machine it did not have a browse in same window option :-(
Thanks in advance
Karpy
Javascript :
CREATE OR REPLACE PACKAGE p_ebb_whatif AS
PROCEDURE call_whatif(
in_session_id IN t_ebb_session.session_id%TYPE );
END p_ebb_whatif;
/
show errors
CREATE OR REPLACE PACKAGE BODY p_ebb_whatif AS
PROCEDURE javascript
IS
BEGIN
htp.print('function fnOpenExcelThing(iSessionID) ');
htp.print('{ ');
htp.print(' var oExcel = new ActiveXObject("Excel.Application" ');
htp.print(' var vPath = "F:\\dev\\andytemp\\WhatIf.xls"; ');
htp.print(' var oBook = oExcel.Workbooks.Open(vPath); ');
htp.print(' var oSheet = oBook.Worksheets.Add(); ');
htp.print(' // Data ');
htp.print(' oSheet.Cells(1, 1) = iSessionID; ');
htp.print(' // Call the function to monkey with the results ');
htp.print(' // oExcel.Run("subFormat" ');
htp.print(' // Let the user see the application ');
htp.print(' oExcel.Visible = true; ');
htp.print(' // Give the user the control of the application ');
htp.print(' oExcel.UserControl = true; ');
htp.print(' } ');
END;
PROCEDURE call_whatif(
in_session_id IN t_ebb_session.session_id%TYPE )
IS
BEGIN
htp.print('<HTML> ');
htp.print(' <HEAD> ');
htp.print(' <SCRIPT LANGUAGE="JavaScript"> ');
javascript;
htp.print(' </SCRIPT> ');
htp.print(' </HEAD> ');
htp.print(' <BODY onload="fnOpenExcelThing(');
htp.print(in_session_id);
htp.print(');">');
htp.print('<DIV>Loading...</DIV></BODY></HTML>');
END call_whatif;
END p_ebb_whatif;
/
show errors