April 13, 1998

Exploring Ways To Embed Documents in Intranet Pages

By Steven L. Telleen

Q: I'm thinking of adding an expense report function to our intranet and want to know how I might embed an Excel document in a Web page. 

Advisor: You have several choices when deciding to embed a document in a Web page--whether it be an Excel spreadsheet, a Word document or some other file--and the one you choose depends on the assumptions you make about your audience and how they want to use the content. 

The first, and oldest, option assumes that every member of your audience has Excel or Word on his or her system. The intranet is used to provide an easier way for the user to find a specific document and bring it down to his or her computer. A Word or Excel document is placed in a folder on the Web server, and a link is used on the Web page to point to the document in the same way it would point to an HTML document. The only difference is that instead of the file name ending in "html," the file name ends with "doc" for a Word document or "xls" for an Excel document. 

When the visitor selects a link for one of these documents, the Web server sends the file, and the browser automatically starts the proper helper application and opens the file. If the browser does not recognize the application that created the document, or cannot find the application on the receiver's system, it offers the option of saving the file on the client system so the application can be found and started by the receiver. 

Web servers and browsers do this by leveraging an earlier Internet standard called the Multipurpose Internet Mail Extensions (MIME). To work, both the Web server and the Web browser must have the "dot extension" defined in their MIME table. This table tells the Web server and browser which extensions are associated with which applications. Most browsers today come with the Word and Excel extensions already in their MIME tables, but companies also can define and add files from custom applications by adding a unique extension to the MIME tables of their Web servers and browsers. 

The browser plug-in provides a second option for making documents accessible. A plug-in is the viewer part of a larger application that allows the visitor to view, but not edit, the document without leaving the browser. There are plug-ins for both Word and Excel, and many other applications. Application vendors generally make their plug-ins available for free over the Internet. 

A third option is saving the Word or Excel document as HTML. Office 98 has these options built into the "Save As" function. Office 95 has "Internet Assistants" that can be downloaded from Microsoft and added to their Office products to save files in HTML. However, if your authors are going to manage the documents in native Word and Excel format, this approach adds complexity. Instead, you might consider using a product like Net-It-Central or Transit Central, which allow authors to put native files, like Word and Excel, in a directory to be converted automatically to Java as the files are requested. 

Using plug-ins or HTML conversion tools presents the Word and Excel content through the browser but as separate pages. If you want to embed the content from these applications inside a page surrounded by other HTML, then the solutions are more difficult and custom. Products based on the new XML standard will change this, but for today, this problem is not one with an off-the-shelf solution. 

Date: 19980413
Copyright 1998 Mecklermedia Corporation.
All Rights Reserved. Legal Notices.