Is it possible to create a fixed field-length output file?
This would mean that column 1 has a fixed length of 32, column 2 has a fixed length of 20, and so on.
I saw there is a ticket fixed width output that was using string manipulation, but I couldn’t get it to work. Could anybody explain how to set this up?
If you have one column and would like to split it to multiple ones with fixed length I would use Cell Splitter By Position node. If that doesn’t help can you provide some input data and expected output to figure out what are you exactly dealing with?
I just found out about the string manipulation step padRight(str, size) which performs this task for me.
The only issue I have is that only 1 column is possible, where I would need about 20 different columns of different sizes.
So what I would need will look like this:
$PARTNO$ = padRight($PARTNO$, 32);
$DESCRIPTION$ = padRight($DESCRIPTION$, 20);
$ATACHAPTER$ = padRight($ATACHAPTER$, 5);
You should be able to do this using the Column Expressions node, with one expression per column you need to adjust. So, lots of expressions, but at least it would all fit in one node. Then you could use a Column Combiner afterward to build a single line, like this: