FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

Automated export from formula to CSV file

Startseite ' Community ' FPScript ' Automated export from formula to CSV file

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #33523
    Norbert Bakkers
    Teilnehmer

    I’ve written a FlexPro function (in FlexPro script) with a number of arrays defined within the function e.g:

    myTime = 0. # NumTimeSteps
    myResult1 = 0. # NumTimeSteps
    myResult2 = 0. # NumTimeSteps
    myResult3 = 0. # NumTimeSteps
    myResult4 = 0. # NumTimeSteps
    myResult5 = 0. # NumTimeSteps

    Then I populate them with data.

    I would then like to export the resulting arrays into CSV files from within the formula. The formula will be called multiple times, so I would like the process to be as automated as possible.

    What would be the best way to go about this?

    #33525
    Norbert Bakkers
    Teilnehmer

    I’ve written a FlexPro function (in FlexPro script) with a number of arrays defined within the function e.g:

    myTime = 0. # NumTimeSteps
    myResult1 = 0. # NumTimeSteps
    myResult2 = 0. # NumTimeSteps
    myResult3 = 0. # NumTimeSteps
    myResult4 = 0. # NumTimeSteps
    myResult5 = 0. # NumTimeSteps

    Then I populate them with data.

    I would then like to export the resulting arrays into CSV files from within the formula. The formula will be called multiple times, so I would like the process to be as automated as possible.

    What would be the best way to go about this?

    #33524
    Bernhard Kantz
    Teilnehmer

    If you want to automate the export you have to write a VBA macro.

    Example:

    Dim oFml As Formula
    Set oFml = ThisDatabase.RootFolder.Object(“Formula”, fpObjectTypeFormula)
    oFml.Export fpExportFormatCSV, “…Path…”

    support@weisang.com

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.