Volker Lenhardt wrote:
Andrew Douglas Pitonyak schrieb:
Turns out I had an example in my book that snows how to link.

Andrew Douglas Pitonyak wrote:

REM  *****  BASIC  *****
Option Explicit

Sub Main
 Dim oSheet
 oSheet = ThisComponent.getSheets().getByIndex(0)
 oSheet.link("file:////andrew0/home/andy/foo.csv", _
    "Sheet1", _
    "Text - txt - csv (StarCalc)", _
    "FIX,34,0,1,0/3/8/2/19/10", _
    com.sun.star.sheet.SheetLinkMode.NORMAL)
End Sub



Thank you very much, Andrew, it works, though I think the API is slightly cloudy in this respect. :-(

I understand that oSheet.link returns a Sheetlink, but it doesn't, when I initialize oSheet by

    oSheet = oDoc.getSheets().insertNewByName("Voodoo", 0)

I have to put it in 2 lines:

    oDoc.getSheets().insertNewByName("Voodoo", 0)
    oSheet = oDoc.getSheets().getByName("Voodoo")

This is bewildering behavior imho.
It returns nothing!

http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/XSpreadsheets.html#insertNewByName


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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

Reply via email to