Forum FlexPro – Discuss your topic!

Datenexport in Datei

Home > Community > Automation and VBA > Datenexport in Datei

Ansicht von 10 Beiträgen - 1 bis 10 (von insgesamt 10)
  • Autor
    Beiträge
  • #12401

    Gibt es (analog zum Importfilter) auch die Möglichkeit in Flexpro Objekte auch in eigenen Formaten zu exportieren ?!!

    #8084

    Gibt es (analog zum Importfilter) auch die Möglichkeit in Flexpro Objekte auch in eigenen Formaten zu exportieren ?!!

    #8637
    Bernhard KantzBernhard Kantz
    Teilnehmer

    There is no export method which is equivalent to the ImportSpy-method. So it’s not possible to add a custom export filter into the FlexPro export dialog.

    But you can program an export filter with VBA. After that you can create and modify custom toolbars and menu bars to deliver with your Visual Basic application.

    Support@weisang.com

    #8638

    Danke nochmals für die Antwort. Ich muss möglicherweise den Exportfilter in C++ (z.B in Form einer Dll) programmieren. Gibt´s da die möglichkeit die C++ Dll mit VBA einzubinden ?!!

    #8639
    Bernhard KantzBernhard Kantz
    Teilnehmer

    It is possible to write an import filter in C++ (or any other languages that can use COM). This is called an add-in. There are already some customers who have done this.

    FlexPro add-ins are implemented in the very same way as a MS Office addin. The interfaces used when connecting to FlexPro are the same as in MS Office, so the same literature applies. Apart from the different object models there is only one difference: The add-in must be registered below the key

    HKCU\Software\Weisang\FlexPro\7.0\Addins

    so that FlexPro will recognize and load it (it should appear then in the dialog box reachable by Tools\Addin-Manager).

    Please note: Developing an add-in in C++ requires a thorough understanding of COM and MS Office add-in development. We cannot offer any free support regarding add-in development in the bounds of our FlexPro support.

    Support
    support@weisang.com

    #8640

    Sie haben geschrieben “It is possible to write an import filter in C++ “. Sie meinen bestimmt export filter ?

    Ich werde mir das noch ansehen, wie es mit dem Add-in geht, danke.

    Ich möchte noch gerne wissen, ob es die möglichkeit gibt, eine C++ Dll in VBA einzubinden. Das habe ich über das Menü Extras -> Vreweise versucht, ich bekomme die Fehlermeldung “Verweis auf angegebene Datei kann nciht hinzugefügt werden” !!

    #8641
    Bernhard KantzBernhard Kantz
    Teilnehmer

    Anything you can do in VBA is also possible in an add-in.

    Using Tools/References in VBA you can only add references to type libraries or exectutable files containing a type library.

    Regarding C++ DLLs: Depending on the calling convention, it is possible to import functions (no classes) from C or C++ DLLs.
    For instance to import the GetLocaleInfo function from kernel32.dll you have to declare this (see the exampel Importfilter.FPD):

    
    Private Declare Function GetLocaleInfo Lib "kernel32" Alias _
            "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As _
            Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
    

    Please take a look at the VBA help for the declare keyword for more information.

    Support
    support@weisang.com

    #8642

    Ok, it works.. Thanks for the support

    #8643

    In meiner export-Routine bin ich jetzt zum Punkt gekommen wo ich ein Datensatz-Objekt habe (über COM). Wie ich das verstehe soll ich das analog zur Import-routine implementieren, nur aber in der anderen Richtung. Ich denke, das soll auch über BinaryDataLink gehen.

    Beim Importieren wird ein BinaryDataLink erzeugt und mit deren Hilfe alle Eigenschaften importiert. Am Ende wird mit evaluate()-Methode das angegebene Datenverknüpfungsobjekt in einen Datensatz umgewandelt.

    Ich habe erwartet, dass es eine Methode analog zu evaluate() gäbe, die ein Datensatz in einem Datenverknüpfungsobjekt umwandelt. Die habe ich leider nicht gefunden!!

    Ich bin ein Bisschen verwirrt, wie ich da vorgehen soll?

    #8644
    Bernhard KantzBernhard Kantz
    Teilnehmer

    To export data objects in a new custom format you have to read the values and meta information from the data set and write it out with your own code in the required way.

    There is no way to convert a dataset to a data link object, neither binary nor other. To convert it to a binary file would require an extensive description on how to do this as there are countless ways to write out a binary file especially when meta data (or data from further resources) has to be included.
    Regarding the other link object types in FlexPro: When not otherwise specified FlexPro can only read the corresponding file formats. For the ones that are also writable you could simply use the Export method.

    Support
    support@weisang.com

Ansicht von 10 Beiträgen - 1 bis 10 (von insgesamt 10)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.