Selects content from a source of text data, with columns at fixed horizontal positions and widths.
Properties
From
Name of the Input Data Source. The input-source can contain either a file-path, a PBinaryStream object or a .Net Stream object. A Stream object can only be specified programmatically. The format of the source must be a text-file with data, and possibly headers, at fixed horizontal positions and widths.
To
Name of the Output Data Source. The output-source will always be a neutral Table-format.
Parameters
@Context
Specifies in which context to find data in the document. The context is specified as follows: 'Positions/Header/NumberFormat/DateFormat'
Positions 22,32,60,75 comma separated list of positions of the start of next column
Header 1 with header (default) 0 no header
NumberFormat , comma will be used as decimal separator (no 1000 separators are used) . period (default) will be used as decimal separator (no 1000 separators are used)
DateFormat d-M-yyyy
Shortcuts In addition to the above complete specification, the following shortcuts are available instead of specifying Number and Date formats. Positions must always be specified. us set all above to what they typically are in the USA da set all above to what they typically are in Denmark (like most of Europe) Example: 22,32,60,75/da
@Encoding
Set the file encoding. If it is not set, it will use the Byte Order Mark (BOM) and without BOM it will use the default encoding for the Windows implementation. It is possible to set encoding to: UTF-8, UTF-16 (Unicode), utf-16BE (Unicode Big-Endian), windows-1252 and other Code Page Names from https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers (From Perfion 2023R1)
Name of Header, as it is named in the file. If *** is specified this will take all columns, that are not specified by any of the other map entries. If no headers are in the file, they are named Col1, Col2, Col3 …. If you leave "From" empty (No value) you can assign a default value to the feature in "To" by entering e.g. Value="NEW"; in the "Script" field.
To
Name of the Header as it should be called in the Output table
Script
Any Script code to execute for this header
Example
Above example will read the file content shown below, with data at the specified column positions, with no headers, numbers with comma as decimal separator and dates formatted as date-month-year.