# Fixed width columns

**URL:** <https://forum.inductiveautomation.com/t/fixed-width-columns/7621>\
**Category:** 3rd Party Modules\
**Created:** [November 25, 2013, 3:51am UTC](https://forum.inductiveautomation.com/t/fixed-width-columns/7621 "2013-11-25T03:51:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gekkoman](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gekkoman](https://forum.inductiveautomation.com/u/gekkoman)\
**Post date:** [November 25, 2013, 3:51am UTC](https://forum.inductiveautomation.com/t/fixed-width-columns/7621/1 "2013-11-25T03:51:55Z")

</div>

Greeting,

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.

Regards

Tarek

---

<div class="post-metadata">

**Author:** ![gekkoman](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gekkoman](https://forum.inductiveautomation.com/u/gekkoman)\
**Post date:** [November 25, 2013, 6:22am UTC](https://forum.inductiveautomation.com/t/fixed-width-columns/7621/2 "2013-11-25T06:22:52Z")

</div>

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)

Regards

Tarek

---

<div class="post-metadata">

**Author:** ![Pete.Low](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pete.Low](https://forum.inductiveautomation.com/u/Pete.Low)\
**Post date:** [November 25, 2013, 3:48pm UTC](https://forum.inductiveautomation.com/t/fixed-width-columns/7621/3 "2013-11-25T15:48:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gekkoman](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gekkoman](https://forum.inductiveautomation.com/u/gekkoman)\
**Post date:** [November 26, 2013, 1:29am UTC](https://forum.inductiveautomation.com/t/fixed-width-columns/7621/4 "2013-11-26T01:29:38Z")

</div>

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.

Regards

Tarek
