*Translation:*

Running OOo 1.1.4 under XP Pro, no JVM

User wants to use a macro to insert contents taken from a dBase file
into an existing XLS sheet by

   1. opening the XLS sheet
   2. having the macro open the dBase file as a second XLS sheet
   3. mark and copy the data
   4. insert them into the first XLS sheet
   5. close and save the macro

His problem is that only the contents of the clipboard are inserted into
the XLS sheet, not the dBase file. Installation of JVM 1.4.2 did not help.

The macro:

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


*Translator's comment:*

I do not have any experience with dBase and can't help here; and I don't
understand what went wrong in the copy/paste--what was the difference
between the dBase file and contents of the clipboard? Maybe the author
can be more precise.

*General remark:*

This is an English language mailing list. If you don't feel too
comfortable with English you may want to subscribe to a German list, see
http://de.openoffice.org/servlets/ProjectMailingListList.

*Horst Gerbig*

Arlon
_Belgium_

GSM:
Email:

        

+352-091-65 21 18
[EMAIL PROTECTED]





Rothenhöfer Franz-Josef, R961 a écrit :

>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]
>
>
>
>
>---
>avast! Antivirus: message Entrant propre.
>Base de donnÚes des virus (VPS): 0525-2, 22/06/2005
>Test du: 22/06/2005 17:01:33
>avast! - copyright (c) 2000-2004 ALWIL Software.
>http://www.avast.com
>
>
>
>  
>



---
avast! Antivirus: message Sortant propre.
Base de donnÚes des virus (VPS): 0525-2, 22/06/2005
Test du: 22/06/2005 21:46:32
avast! - copyright (c) 2000-2004 ALWIL Software.
http://www.avast.com


Reply via email to