Fixed Width File

Fixed width datasets can be queried in OmniFi using this data source. A fixed width file contains rows and columns, one entry per line, and each column has a fixed width specified by how many characters it contains.

To create a new Fixed Width File Query in the Query Configuration Wizard, follow these steps:

Step 1: Select Query Type

Select the Fixed Width File query type from the list of data sources and optionally specify a name and output destination in the the top half of the Options page.

Step 2: Choose Path & Mode

Choosing the Mode and Path for a Fixed Width File Query is similar to that of an Excel Worksheet Query. See article Excel Worksheet.


The path may also be set to HTTP or HTTPS paths to access online resources.

Step 3: Configure Options

After choosing the mode and path (if applicable), configure the other options for the query:

  • First row is header uses the first row of the data as header.
  • Start at line specifies at which line of the file the query should start. The default value is 1.
  • Default Padding Character specified the default padding character used in the file. This will be used for all rows that does not have a padding character specified in the Column Configuration.

Step 4: Configure Column Options

The configuration for fixed width columns is done in the Column Configuration section.
In this step, specify the following by either typing the value or choosing from the dropdown button:

  • Name: Column header name
  • Padding Direction: Direction from which column is padded
  • Padding Character: Character with which column is padded
  • Length: Column length

It is also possible to preview the output and test the configuration by expanding the "Preview" section at the bottom of the window.

Step 5: Finalizing the Query

Choose Save to save the query without running it, or Save & Run to save and execute the query. If query output is defined then you will see your output in Excel.

A dataset that looks like this:


Would be configured like the below, with the output format visible in the Preview Section.



Defining data types

Data parsed from text files like this will be interpreted as String by default. If this type needs to be changed to others such as Double, DateTime, and Boolean, this can be done in the Report Editor.