简体   繁体   中英

Alternatives to Java applet to launch Microsoft Office applications

In our web application, we used to use a Java applet to invoke MS. Office applications eg Word to open, edit, and save back a file to the server.

Google Chrome will no longer support NPAPI, so soon we can not run our applet in Chrome anymore. Plus, it seems that MS. Edge is not willing to support Java.

So, any suggestions for an alternative for the Java applet. We want to make the same experience for the user, just like before: we do not want to open the files in the browser, or at least try giving the user the same experience as before, meaning a neat editor to edit/save his/her file.

I have also tried Html5 features eg FileSystem API. But, it turned out to me that at least that feature cannot help me. (to my knowledge, maybe I am missing something)

Summary: How to launch client applications eg MS. Word using Javascript/Html5 without any applets/activeX?

From what I'm understanding is you want a way to open an a file using a specific application (MS Word?) and then when the user saves the file it is automatically updated to the server?

You can achieve this by storing the file as a temporary file and automatically checking if the file has changed every few seconds.

This can be achieved using a real-time javascript framework such as NodeJS. The application launch could be met using the following: https://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx

Or perhaps a direct <a href="file://C:/path/to/temp/word.docx">Word</a> would work.

I know of no way to allow a web application launching local files / programs without some intervention by the user. He will as far as I know always need to accept some kind of plugin or will be prompted for some action.

There is one technique I like very much and it is relatively "lightweight": you could give your users the opportunity to either invoke Word manually or setup their computer to support a certain url handler. You can find a description of url handlers here: msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx. After this is set up your application could offer a link similar to msword://file0815.doc . You only need a small programm on the computer to react on this, the same program could combine the installer and setup function (you need some registry entries).

I have seen this in combination with DMS applications and it works quite well, uTorrent does the same for torrent downloads. Internet Explorer and Chrome support this for sure, and I am sure Firefox will too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM