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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to file on file server from web page

Status
Not open for further replies.

SonJ

Programmer
Oct 24, 2002
166
GB
Hi,

I have the following code to link to a file on a file server from my web application.
Code:
file://server_name/share_name/path/file.ext
This opens the file in the browser. Is there any way in which I can make the file open in Excel?

SonD
 
As far as I know active X enables the excel sheet open in the browser. By disabling active x on your machine it should open it up straight away in excel.
 
Hi,

Thanks for the feedback, how can I do this?

SonD
 
Hi SonD
Don't know about disabling ActiveX but you can open an Excel file externally to the browser using it.

function openMSExcel()
{
var objExcel = new ActiveXObject("Excel.Application");
objExcel.Visible = true;
Book = objExcel.Workbooks.Add()
// Place some text in the first cell of the sheet.
Book.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
}

function openAnExcelDoc()
{
var objExcel = new ActiveXObject("Excel.Application");
objExcel.Visible = true;
Book = objExcel.Workbooks.Open("\\\\servername\\share\\blah.xls")
}

// -->
</script>
</head>
<body>
<a href=&quot;javascript:eek:penMSExcel()&quot;>Open Excel externally</a><br>
<a href=&quot;javascript:eek:penAnExcelDoc()&quot;>Open an existing Excel document externally</a>
</body>
</html>

Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top