Using Write to file stream action
- Updated: 2025/08/18
The Write to file stream action enables you to assign a file variable to the CSV or TXT file that you generate from a data table. This action allows you to stream the file variable as a data source for the subsequent actions in the session.
The file stream capability allows you to create and run API Tasks that handle file operations. During runtime, the automation creates a CSV or TXT file using the data available in the data table. The source data table typically contains four types of values: string, number, date, and boolean.
Note: Data containing decimals do not get truncated unless there is a 0 at
the end. For example, if the source table has 87.90490, the data gets extracted as
87.9049.
Settings
The following settings are available in Write to file stream action:
- Data table name
- Select the source data table variable that you must convert to a CSV or TXT file. You can create a table variable or select an existing one.
- File name
- Enter the file name of the destination CSV or TXT file that you want to write data to. The runtime automatically creates the file. Ensure that you include the file extensions <.csv> and <.txt> when entering the file name.
- Row delimiter
- Select one of the following options to set an appropriate row delimiter:
- comma: Set , as the delimiter.
- semi-colon: Set ; as the delimiter.
- colon: Set : as the delimiter.
- tab: Set one tab space as the delimiter.
- new line: Set the next line as the delimiter.
- other: Set a custom character as the
delimiter. Note: Double quotes (") are not supported.
- Column delimiter
- Select an appropriate delimiter for columns. The column delimiter has the same options as the row delimiter.
- Encoding
- Select one of the following options to set an appropriate encoding for the destination CSV
or TXT file:
- ANSI: Select this option for single language use without Unicode character support. ANSI is set as the default encoding.
- UTF-8: Select this option for multi-language use with Unicode character support.
- UTF-8 with BOM: Select this option if you are importing into Microsoft Excel on a Windows machine.
- UTF-16LE: Select this option if your data table contains non-Latin characters.
- Unicode: Select this option if your data contains characters that the standard ASCII encoding does not include.
- Win1251: Select this option if your data table is in one of the Cyrillic languages.
- Shift-JIS (Japanese encoding): Select this option if your data table is in the Japanese language.
- Assign file to a variable
- Select an existing file variable or create a new file variable that you must map to the CSV or TXT file. You can use this variable as a data source for subsequent actions within the session.