Fixed Width Data File

A Fixed-Width format is quite different to a CSV Data File.  There are no delimiters or text qualifiers, and the column location in the file must be precisely defined.


Format

First visit the "CSV Format" tab and choose "Table of Columns: Fixed width fields"



  1. Set the first row the reader should start reading from (skip any header lines),
  2. There is no further configuration for the format, as there are no delimiters, qualifiers, etc.  It is assumed that there are no comments in the file either.


Columns

The next step is to configure the columns within the file.

Only the columns required need to be defined, and the same block of text in the file can be imported into more than one column.



The "Name" will be used for the name of the column inside mXrap.

The "Type" can be one of several types.

If the type is a date, then the date format must also be specified, as the computer cannot reliably detect the format itself.


Column Start and Ends

The "Column Start" and "End" define the character columns that the column will start and finish with (inclusive).

In this example, we want to read the text "FIELD" out of the row.

The file (alphabet.txt) is opened with Notepad, with the Format->WordWrap turned off and View->StatusBar turned on.

The cursor is positioned before the F in field, and the status bar tells us that is the 8th column.  So the Column Start is 8.


Position the cursor after the D in field, and use the column for the Column End.


This is how the column should be configured:


And the result viewed in a TableView looks like this:


Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily