Bill Gradwohl wrote:
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
IIRC this return a currently active document. So, it is supposed Calc to
be open.
Sheets = doc.Sheets
and then it get access to Calc 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?
document
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.
This is case of OOo Basic, but not API itself. That's might be reason
you cannot find it there.
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]