Open excel file through normal html link -


i encountering issue i'd put link shared excel sheet in our intranet. unfortunately normal href="http:..." link automatically opens , saves local machine instead of enabling work on shared sheet on server itself.

i have read through here bit , found solutions : file://///server/path/excel.xls sadly solution doesn't anything.

if relevant: server version windows server 2012

http stateless protocol. means when users download file intranet via http, downloading copy, rather original. changes make appear in copy, , end loads of copies of same workbook different, possibly overlapping changes. don't want that!

and ... how users going upload changes?

you need create shared folder on network , put workbook there. can use file:///server/path/file.xls format in <a /> links on intranet direct user actual file on server.


i recommend start creating simple html doc on desktop familiar file:/// path format. eg

<html>     <head />     <body>         <a href="file:///server/path/file.xls">click</a>     <body>  <html> 

save in notepad , rename extension .txt .html.

you can type file:/// paths straight windows explorer's address bar allow testing paths without resorting html document mentioned above.

unfortunately! seems browsers default behavior download link rather open (even if local resource), if want open must resort changing browser intranet permissions allow js access local resources, allows use technique below.


this article (http://www.codeproject.com/articles/113678/how-to-execute-a-local-file-using-html-application) uses

<script type="text/javascript" language="javascript">     function runfile() {     wshshell = new activexobject("wscript.shell");     wshshell.run("c:/windows/system32/notepad.exe", 1, false);     } </script> 

to open notepad. can use command line arguments excel.exe (https://support.office.com/en-za/article/command-line-switches-for-excel-321cf55a-ace4-40b3-9082-53bd4bc10725) tell file path is...

excel.exe "c:\path\excel.xls" 

Comments