Home > Ask the Domino Experts > Questions & Answers > Creating tables through LotusScript
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Creating tables through LotusScript

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 03 February 2003
I wish to create tables through LotusScript. I have tried and it is possible to render an item to HTML in LS (Lotus Script). Is it possible to do this in the backend? Also, has R6 solved this problem?

>

I'm assuming you want this for a Notes application, since for a Domino Web application you can just store the raw HTML and mark it as passthru, so there is no need to convert it to a rich text table.

It sounds like you've already discovered the NotesUIDocument.Import method for converting HTML to rich text in the front end. No equivalent function exists in back-end LotusScript.

You just want to create tables in the back end and you don't require that they come from HTML, you do have some choices. I recently wrote about them in the Redbook, "Domino Designer 6: A Developer's Handbook", which you can download free. Some of the techniques there are for Notes 6 only, but some work for Notes 5 as well -- the book says which.

The lowdown is, for Notes 5, you can't create a "true" table of any length you desire -- you can, however, copy a table from elsewhere, with a fixed number of rows, and fill data into the rows. You can more or less duplicate the appearance of a table of any number of rows, using one-row tables with very little space between them.

Notes 6 lets you create tables directly from LotusScript and control their length and contents. Many table formatting options are not available from LotusScript in Notes 6, so you may not be able to get exactly the appearance you want this way. However, by combining the two techniques you can generally accomplish what you want -- copy a table from elsewhere that's already formatted the way you want it, and use the NotesRichTextTable and NotesRichTextNavigator classes to add rows and insert data into the cells.

Another alternative available for Notes 5 is to use the Lotus XML Toolkit to create Notes documents by importing DXL data using Java. For Notes 6 you can do the same thing, but the DXL handling capability is built in to LotusScript (NotesDXLImporter class). This is not really covered in the Redbook, but there is a Redbook for R5 "XML Powered by Domino", and the Domino Designer help covers DXL functions for Notes 6.

There are also two third-party tools I know of that let you do rich text creation from LotusScript, with more functionality than is offered in Notes 6. These tools provide a LotusScript callable interface to Notes C API functions for manipulating rich text. They are:

I have not used either of these myself, so I can't offer an evaluation.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts