TSTool / Command / WriteTableToDelimitedFile
WriteTableToDelimitedFile command writes a table to a delimited file.
This command is the analog to the
It can be used to provide tabular data to other programs, such as spreadsheet programs and geographic information systems.
It is also useful to write tables to delimited text files for automated tests.
The default is to write a standard file header using comment lines that start with the
If available, column names will be written in double quotes as the first non-comment row.
Formatting for cell values is limited and the default precision of floating point numbers
may include too many digits – this will be addressed in future updates.
The following dialog is used to edit the command and illustrates the command syntax.
WriteTableToDelimitedFile Command Editor (see also the full-size image)
The command syntax is as follows:
|Identifier for the table to write. Can be specified using processor
|None – must be specified.
|The name of the file to write, as an absolute path or relative to the command file location. Can be specified using processor
|None – must be specified.
|The names of columns to write, separated by commas.
|Write all of the columns.
|The names of columns to not write, separated by commas.
|Write all of the included columns.
|Indicates whether to write the header comments,
False. Some programs do not handle delimited files with comments.
|Indicates whether to write the column names,
False. Some programs do not handle column names.
|Delimiter character to separate column values, must be a single character if specified
|Indicates whether values in date/times columns should always be surrounded by double quotes:
Quoting may impact how date/times are handled in other programs, for example in Excel.
|Indicates whether values in string columns should always be surrounded by double quotes:
An example of using
AlwaysQuoteStrings=True is to quote identifiers that have a leading zero (e.g.,
01234567). Not quoting may cause the values to be interpreted as integers when read from the delimited file.
|The string to replace newlines in string values, necessary to prevent unexpected line breaks in output rows. In order to handle newlines from various systems, the following patterns are replaced in sequence:
The following special parameter values are recognized:
|Do not replace newlines (file format may be unusable because of unexpected line breaks)
|The value to write for
NaN data values. Specify the word
Blank to write a blank (empty string).
|Name of schema file to write, useful to help other software understand contents of the delimited file. See the
OutputSchemaFormat parameter. This is an experimental feature being evaluated to facilitate data exchange between software.
|Do not create schema file.
|Schema format, one of the following, output is limited but will be expanded in the future:
See the automated tests.