Input a fixed width format file

<< Click to Display Table of Contents >>

Navigation:  How do I? >

Input a fixed width format file

Typically fixed width files have fixed width columns of text separated by spaces. They tend to be associated with legacy systems, but are also used for large files where performance is an issue (e.g. bioinformatics).


We don't currently explicitly support fixed width as a format. But you can input fixed width format files into Easy Data Transform with a few extra steps. For example, for this file:


example fixed width format file


Rename the file to have a .txt file extension (if it hasn't already) and drag it onto Easy Data Transform. Set the delimiter to something that is not used in the text, e.g. caret (^), so that it will import it as 1 column.


Input fixed width format file


Add a Javascript transform and use the Javascript substring() method to reconstruct the column as delimited text.


fixed width text file


3. Then add then a Split Col transform to break the delimited text into separate columns.


fixed width format file


You may then want to Whitespace the new columns and Remove Cols the first 2 columns. You can remove unwanted rows using Filter.


We may add fixed width as an additional input type to make this easier, if enough people are interested. Let us know.