Fixed width columns


in the Instrument Interface parsing CSV works fine, however I have a file that is fixed width columns which there seems to be no way to parse:

Attached image shows sample data lines.

If I use the CSV on the “hyphened” line I can correctly define columns and name them using a delim, but as soon as you have a column that contains a (eg DBFS Chardonnay) it all falls in a heap

The fixed parsing only allows expansion horizontally but not vertical.

Am I missing something? Or is this a missing option at the moment.



As a workaround I should be able to setup a CSV lookup per fixed column, set a non-existant delimiter and then manage them through the parseobject. i.e get multiple rowCollections

Works for many columns but I seem to be seeing buggy parse behaviour when I have “,” in my numbers.

  1. Int’s cannot handle “,” in format eg 1,200. Pretty common format => try float instead

  2. Floats - seems not to handle differing formats implicitly eg 1.23 123.4, 1,230 etc for a delimited field these should be able to be automatically handled => have to use string instead. (Note: the only exception is the radix and comma symbol may have to be defined as various regionalities interchange these]. Eg a float is {+/-}{{N}{N}{N}{,|.}}{N}{N}{N}{.|,}{N}{E}{+/-}{{N}}

  3. To get around the above try using string - unfortunately a “0” string column shows up correctly in the preview but is dropped in the parseResults.getRowCollection().getParseRows(). (the preview shows 65 rows sampled, the getParseRows() only shows 57 - the only ones missing are the ‘0’ strings.

Am using Ignition 7.6.4-rc3 (b2013110714)



Please attach a sample of the file and we can take a look at the issues you have.

Data File attached

In the template “Schedule”, I have following settings on the rate column (see image)

fileStr = system.file.readFileAsString("/opt/dbw/ignition/schedule/wk48a.csv")
parseResults = system.instrument.parse.parseText(“Schedule”, fileStr)
print len(parseResults.getRowCollection(“rate”).getParseRows())

This code returns 57 not 65 as the preview and correct answer shows.