FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

Automated export from formula to CSV file

Home page Community FPScript Automated export from formula to CSV file

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33523
    Norbert Bakkers
    Participant

    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
    Participant

    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
    Participant

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.