Component: CSV Writer (Runtime Tools)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Runtime Tools |
Contents
CSV Writer component
A component to simplify the task of creating and dumping data to a CSV file that can be loaded into Microcoft Excel or LibreOffice Math to create nice charts and graphs.
Examples
Simple example file to generate a two column CSV file that can be loaded into Microsoft Excel or LibreOffice Math.
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
CloseFile
Closes the file and finishes off any pending writes ready for use in an external application.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
AddString
Adds a string to the CSV followed by a comma.
This will form a single column of data in the CSV file.
Parameters
- <- STRING data
- This parameter may be returned back to the caller
Return value
- This call does not return a value
AddNumber
Adds a number to the CSV followed by a comma.
This will form a single column of data in the CSV file.
Parameters
- FLOAT data
Return value
- This call does not return a value
OpenFile
Creates or opens a file ready for streaming data.
If the file already exists then the contents will be deleted and the file started again from scratch.
Parameters
- <- STRING Filename
- This parameter may be returned back to the caller
Return value
- This call does not return a value
NextRow
Move to the next row in the file
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Property reference
Filepath
This property is of type Directory and can be referenced with the variable name Filepath.
Sets the path of the file to write to.
$(srcdir) default sets the path to be the same as the Flowcode project path.