Use the New CSV Output Stream step type to create a CSV file for writing and store a reference to it. The file open mode controls the behavior if the specified file already exists. After you open the file, you can write to it using the Write Record step type or the TestStand API.

Each invocation of a Write Record step writes a single row of data to the output CSV file. You can specify a row using either a container or an array. If you specify a container, the subproperties of the container correspond to columns in the CSV file. If you specify an array, each array element corresponds to a column in the CSV file.

You can also write to the output file using the TestStand API. See for example OutputRecordStream.WriteRecord(), CsvFileOutputRecordStream.WriteLine(), and CsvFileOutputRecordStream.WriteFieldHeaders(). You must close the CSV file when you are finished with it by calling the OutputRecordStream.Close() method.