I have a Basic script to copy one sheet to another sheet in the same file. I am doing it this way:
Code: Select all
ThisComponent.Sheets.copyByName(sourceSheetName, nameOfNewSheet, 32767)
Code: Select all
sub testCopy
Dim Dummy()
oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDocPersonList = StarDesktop.loadComponentFromURL("file:///d:/test.ods", "_blank",0, Dummy() )
document = ThisComponent
'document.Sheets.copy(oDocPersonList.getSheets.getByIndex(0), "test", 32767)
end Sub
Thanks,
A.