By using TFieldedText to write the CSV file, you do not have to worry about formatting. TFieldedText will ensure that the data in the CSV file is laid out as specified by the Meta.
The full source code for this tutorial lesson can be downloaded from the component's home page
Step 1: Select a folder
Create or select an empty folder for the program we are going to develop.
Step 2: Create Fielded Text Meta file
The Meta file specifies the structure of the text file. In this step we will create a Meta file called "BasicExample.ftm" for the text file. There are 2 ways of doing this.
The easy way is to simply download the Meta file from here (Right Click | Save Link/Target As) and place in the folder where the compiled executable will run from.
Alternatively, you can create it with a Fielded Text Editor. This will provide a better understanding of what a Meta file actually is. Follow the steps here to create the "BasicExample.ftm" and then save it into the folder where the compiled executable will run from.
The contents of the Fielded Text Meta File should be similar to the text shown below: