Code: Select all
Sub Main
oDest = thiscomponent.Sheets(2)
ImportSheet("/home/LocalSync/foo.ods", "Sheet1", oDest)
End Sub
Sub ImportSheet(sDoc, sSheet, oSheet)
sURL = convertToURL(sDoc)
oSheet.link(sURL, sSheet, "", "", com.sun.star.sheet.SheetLinkMode.NORMAL)
oSheet.LinkMode = com.sun.star.sheet.SheetLinkMode.NONE
oSheet.LinkURL = ""
End sub
Is it possible to avoid it?