Using the 2.0 Beta, I have opened an external database and then copied data into Calc. Because you are accessing a DBF file, perhaps you can use a different method. My wife told me that I have to go to bed now so I will not provide a solution, but....
If the data is NOT to large, then you can
1. Open the DBF File.
2. Determine the used area as follows (taken from my free macro document):

 Dim oCell As Object
 Dim oCursor As Object
 Dim aAddress As Variant
 oCell = oSheet.GetCellbyPosition( 0, 0 )
 oCursor = oSheet.createCursorByRange(oCell)
 oCursor.GotoEndOfUsedArea(True)
 aAddress = oCursor.RangeAddress

3. Get the data as a single data array.
4. Open the new or target database.
5. Set all of the data in one shot as a data array.

Sorry that I do not have time to produce the entire solution.

Rothenhöfer Franz-Josef, R961 wrote:

Hallo,

meine Ausstattung XP-Prof, OO1.1.4 ohne JVM

Problem:

In ein bestehendes XLS-Sheet soll per Makro Daten aus eines dBase .dbf Datei 
übernommen werden.

Ablauf:

1. Öffnen XLS-Datei
2. Dann per Makroaufzeichnung
        - öffnen DBF-Datei als 2. XLS Sheet
        - markieren und kopieren
        - einfügen in Original-XLS
        - Makro beenden und speichern

Das Problem ist aber, dass im Makro nur die Zwischenablage ge"pastet" wird. D. 
h. bei einem Aufruf wird nicht die DBF- Datei sondern der Inhalt der Zwischenablage 
eingefügt.

Wo kann der Fehler liegen???

Auch nach Installation vom JVM 1.4.2 keine Änderung.
Makro

REM  *****  BASIC  *****


sub Pfarr
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 ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:Open", "", 0, Array())

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$A$2"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())


end sub




Mit freundlichen Grüßen

Rothenhöfer Franz-Josef

Anstalt für kommunale Datenverarbeitung in Bayern
KDZ Würzburg, Ohmstraße 16, 97076 Würzburg

Tel.:      0931 / 20016-6161
Fax.:     0931 / 20016-6180
PC-Fax: 089 / 548229-6161
Mail: [EMAIL PROTECTED]



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to