von m-wolf » Sa, 16.06.2007 13:29
hi,
wie mache ich denn eine Stringverkettung?
hier das Makro:
Code: Alles auswählen
sub speichern
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$E$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args3(2) as new com.sun.star.beans.PropertyValue
args3(0).Name = "URL"
args3(0).Value = "file:///home/micha/Desktop/RE-07140.ods"
args3(1).Name = "FilterName"
args3(1).Value = "calc8"
args3(2).Name = "SelectionOnly"
args3(2).Value = true
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint"
args4(0).Value = "$E$11"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args6(2) as new com.sun.star.beans.PropertyValue
args6(0).Name = "URL"
args6(0).Value = "file:///home/micha/Desktop/m%C3%BCller%20neuenweg.ods"
args6(1).Name = "FilterName"
args6(1).Value = "calc8"
args6(2).Name = "SelectionOnly"
args6(2).Value = true
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args6())
end sub
In args6(0).Value soll danm der Pfad und "der Zelleninhalt".ods stehen
mfg MW
hi,
wie mache ich denn eine Stringverkettung?
hier das Makro:[code]sub speichern
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$E$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args3(2) as new com.sun.star.beans.PropertyValue
args3(0).Name = "URL"
args3(0).Value = "file:///home/micha/Desktop/RE-07140.ods"
args3(1).Name = "FilterName"
args3(1).Value = "calc8"
args3(2).Name = "SelectionOnly"
args3(2).Value = true
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint"
args4(0).Value = "$E$11"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args6(2) as new com.sun.star.beans.PropertyValue
args6(0).Name = "URL"
args6(0).Value = "file:///home/micha/Desktop/m%C3%BCller%20neuenweg.ods"
args6(1).Name = "FilterName"
args6(1).Value = "calc8"
args6(2).Name = "SelectionOnly"
args6(2).Value = true
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args6())
end sub[/code]
In args6(0).Value soll danm der Pfad und "der Zelleninhalt".ods stehen
mfg MW