Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Fixed Width

Table Extract Method Grooper.Extract

Reads tabular data from a fixed-width text document using a predefined record layout.

Remarks

The Fixed Width extract method is designed for documents where tabular data is presented in rows of text with columns defined by fixed character widths, rather than by delimiters or visual separators. This method is ideal for legacy reports, mainframe printouts, or any scenario where each field in a row occupies a specific number of characters.

Extraction is performed in two steps:

  1. A 'Row Extractor' identifies each table row in the document.
  2. Each row is parsed into column values according to the configured record layout, which specifies the width (in characters) of each column.

Usage Guidance

  • Use Fixed Width when your source data is formatted as plain text with columns aligned by character position.
  • Configure the 'Row Extractor' to match each logical row in the table.
  • Define the 'Record Layout' to specify the width of each column, using a Lexicon with key-value pairs for column names and widths.
  • Enable or disable whitespace trimming for extracted values using the 'Trim' property.

Example

Suppose you have a text table like:

1001 John Smith 2023-01-01 $123.45 1002 Jane Doe 2023-01-02 $234.56

You might define the record layout as:

ID=5 Name=13 Date=12 Amount=8

This will extract each field based on its fixed width, regardless of the actual content or spacing.

Proper configuration of the record layout and row extractor is essential for accurate extraction.

Properties

NameTypeDescription

See Also

Used By

Notification