|
|
|
|
|
|
|
|
|
|
|
|
|
|
Linking Domino to Excel via XML (continued)
A little further on, we'll show an example that's a generic Web agent, which will work in any database. It takes a single parameter -- the name of the Notes view you wish turned into HTML. If no parameter is given, it will use the default view, and if there's no default view it will take the first view in the database.
Then it outputs a header line (using the <TH> tags as above), and scans every row in the view, prefixing each value with a <TD> tag. Finally, it closes the HTML table with a </TABLE> tag and ends. For maximum speed, it uses the ColumnValues property of the document, rather than examining the contents of the document itself.
When the resulting page is brought into Excel, the final column totaled using an =SUM formula and the document hyperlinks are preserved. Clicking on the first cell while in Excel will open up a new browser window to drill down to the linked Notes document.
The convert-any-view-to-HTML agent This agent should be created with the trigger Manually from Agent List and the selection type All Documents in Database. It must be a shared agent, and have no spaces in its name. You can see the complete example in http://www.component-net.com/dp-extras/excel.html.
You can easily copy this agent into any database and use it to turn any view into a simple, Excel-compatible Web page. And because it finds out everything about the view itself, there's no need to change it if the underlying view is modified -- it will automatically adjust to the changed format.
The agent also demonstrates some useful techniques, such as interpreting URL parameters, building hyperlinks and turning a column of numbers into Excel references.
As a generic agent, there's room to make it more sophisticated by adding more parameters, such as the border width or column to total. Alternatively, you may wish to customize this agent for particular views. You can customize it, for example, by adding totals to selected columns, changing the alignment or typestyle of certain cells, hyperlinking multiple cells, adding Excel formulas or filters.
Summary The Web paradigm is fast becoming the glue between all manner of disparate systems. Other Web servers will deliver this type of functionality when Microsoft deliver Office 2000, but with these basic techniques, your Domino server can be the at center of that evolving Web, intelligently delivering data to your Microsoft Office 97 users, right now.
Product availability and resources Information on Microsoft Office and future release of Excel are available from http://www.microsoft.com.
Giving equal time to our favorite patrons, you can find loads of additional information on Domino at http://www.lotus.com.
|
Jeffrey R. Burrows has been working with Notes for several years and Domino since its beta cycle. He is currently implementing Notes and Domino solutions for local government in Scotland. His web site experience stretches back to 1992 and the popular rec.travel guide to Morocco, which he still maintains with a trusty DOS editor. Jeffrey can be reached via email at jey@compuserve.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|