Topic
Automated export from formula to CSV file
Page d'accueil ' Communauté ' FPScript ' Exportation automatique de la formule vers un fichier CSV
- Ce sujet contient 2 réponses, 2 participants et a été mis à jour pour la dernière fois par Norbert Bakkers, le il y a 12 années et 11 mois.
-
AuteurMessages
-
19.06.2012 à 14:36 #33523Norbert BakkersParticipant
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. # NumTimeStepsThen 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?
19.06.2012 à 14:36 #33525Norbert BakkersParticipantI’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. # NumTimeStepsThen 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?
25.06.2012 à 12:42 #33524Bernhard KantzParticipantIf 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…”
… -
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.