I've seen several subroutine examples that all contain the same sequence
of opening executable statements when working with a spreadsheet, as
does the following example:

sub dumpSheets

Dim doc as object
Dim Sheets As Object
Dim SheetNames
Dim I As Integer

' Executable statements follow:
doc=StarDesktop.CurrentComponent
Sheets = doc.Sheets

SheetNames = Sheets.getElementNames
For I=LBound(SheetNames) To UBound(SheetNames)
       MsgBox SheetNames(I)
Next I
end sub


When doc is initialized, what object exactly is it associated with? 
Is it a com.sun.star. (document or container or sheet or ...) what?

For the life of me, I can't find the thing called "Sheets" as in
doc.Sheets, anywhere in the API, so I can't understand how the
initialization of Sheets = doc.Sheets works. 
How am I supposed to know that something called "Sheets" exists? 
Where is this documented in the API?

I've spent hours trying to go thru the API at
http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html
and can't seem to get my brain around how to find something as
rudimentary as the doc.Sheets item.

Any help would be appreciated.

-- 
Bill Gradwohl


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to