von Karolus » Fr, 21.03.2008 22:47
Hallo
Gehts damit:
Code: Alles auswählen
.....
osheet = thiscomponent.currentcontroller.activesheet 'aktuelles Tab.blatt
ocursor = osheet.CreateCursor()
ocursor.gotoendofusedarea(0)
lzeile = ocursor.getrangeaddress.endrow+1 'letzte benutzte Zeile
'print lzeile
laddress = "C" & lzeile
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$C$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "EndCell"
args2(0).Value = laddress
dispatcher.executeDispatch(document, ".uno:AutoFill", "", 0, args2())
....
Gruß Karo
Hallo
Gehts damit:
[code]
.....
osheet = thiscomponent.currentcontroller.activesheet 'aktuelles Tab.blatt
ocursor = osheet.CreateCursor()
ocursor.gotoendofusedarea(0)
lzeile = ocursor.getrangeaddress.endrow+1 'letzte benutzte Zeile
'print lzeile
laddress = "C" & lzeile
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$C$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "EndCell"
args2(0).Value = laddress
dispatcher.executeDispatch(document, ".uno:AutoFill", "", 0, args2())
....[/code]
Gruß Karo