Python, win32com, lotus123

brix22 at brix22 at
Wed Nov 22 05:34:19 CET 2000

In article <eBZR5.63133$a7.1106848 at>,
  "Larry Whitley" <ldwhitley at> wrote:
> What I'm trying to do is to
> use win32com to interface to Lotus 123 to generate some nice
printable and
> viewable graphs.  I've managed to start 123 program and make it
visible but
> need some pointers on how to put the data into Lotus and generate and
> graphs.  I assume that there is some Lotus documentation that I'm
missing -
> can someone point me in the right direction?  Or perhaps tell me what
> should be looking for?

Following up on your example, here's some code to open a window on the
document and enter some text in a range.

import win32com.client
ssDoc = win32com.client.Dispatch( "Lotus123.Workbook" )
ssDoc.Parent.Visible = 1
print ssDoc.Author
docWindow = ssDoc.NewDocWindow()
ssDoc.Ranges("A:A1").Contents = "foo"

It's been about four years since I've worked in the SmartSuite object
models extensively, but the main tips for figuring them out are ...

(1) Use the record feature to get 1-2-3 to create LotusScript code for
(2) The resulting code often uses shortcuts which can't be accessed
through automation.  Use the "Browser" in the Script Editor to look
through the list of available classes to figure out what object "owns"
the object you are trying to work with.  That object will likely have
some sort of accessor method to let you get at the object you really
want (e.g. the Ranges method in the Document class).
(3) Make sure the LotusScript help files are installed.  They are not
by default.

- Doug

Sent via
Before you buy.

More information about the Python-list mailing list