Follow the steps below to write a CSV file. This example also shows how to format a column from a standard number into its dollar representation (see Step 7). The input RowSet data being used is based on the example in the
RowSets topic.
From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Write CSV task to the Project Outline.
On the Basic tab of the Write CSV task, specify values for the following attributes:
Input RowSet Variable
The name of a variable of type RowSet which contains data to write to a file.
Output File
The
file path and file name of a single file to write.
Click the
Add
button in the sub-menu and select the Specify Data Options menu item.
Click the
Add
button in the sub-menu and select the Add Column menu item.
On the Basic tab of the Write CSV Column element, specify the Index value:
Index
The index of the column in the input RowSet.
On the Type Conversion tab of the Write CSV Column element, specify values for the following attributes:
Data Type
The data type of this column. The output data type does not need to match in input type. The example in the Read CSV Task converted the Currency Data Type to a Number. This allows you to convert the number back to a Currency Data Type.
Pattern
The pattern to use to format
numeric or date/time fields.