mhm .. also ich hab da mal folgendes ausprobiert :
Code: Alles auswählen
...
Dim Temp as variant
dim oTemp as object
Dim Args(2) as variant
...
oFunctionAccess = createUnoService( "com.sun.star.sheet.FunctionAccess" )
...
Args(0) = "soffice"
Args(1) = "\\Server\test.XLS"
i=14
do
Args(2) = "Tabelle1.A"+right(str(i),2)
otemp = oFunctionAccess.callFunction( "DDE", Args())
...
egal wie ich es drehe und wende , ich bekomme immer einen "...illegalArgumentException.Message:." Fehlermeldung.
Irgendwie scheint "callFunction" nicht mit DDE zu funktionieren oder ich hab irgendwas mit den Parametern falsch gemacht ..
Ende vom Lied ist nun , ich habe es mit der von Stephan vorgeschlagenen Methode gemacht ..
Code: Alles auswählen
...
datei = converttoURL("\\File-srv\....XLS")
Prop(0).Name = "ReadOnly"
Prop(0).Value = True
Prop(1).Name = "Hidden"
Prop(1).Value = true
aktDatei = StarDesktop.loadComponentFromURL(datei, "_blank", 0, Prop())
i=13
do
MyDialog.Title = "Einlesen von ....XLS"
oProgressBarModel.setPropertyValue( "ProgressValue", 25 )
temp = aktDatei.Sheets(0).getCellbyPosition(0,i).string
if left(temp,6) = "Mit fr" then exit do
if val(temp) = 0 then goto nowritePH
'Vergleiche mit bestehenden Nummern und ggf. nachtragen
Z = PartStringinArray(aPH(),temp,0)
if Z < 1 then
TabellePH.getCellbyPosition(0,iPH).value = aktDatei.Sheets(0).getCellbyPosition(0,i).value
TabellePH.getCellbyPosition(2,iPH).string = aktDatei.Sheets(0).getCellbyPosition(2,i).string
iPH= iPH + 1
end if
nowritePH:
i=i+1
loop
aktDatei.close(0)
...
und so läuft es super

.. Danke nochmal für den Tip mit dem "Hidden"-Modus
Danke an alle
Projekt gelöst !