cancel
Showing results for 
Search instead for 
Did you mean: 

How to make each column of the file with a fixed width

Former Member
0 Kudos

Hello

I have a "MII Transaction" and need to create a TXT file where each column is separated by a delimiter character ";" and also each column will have its fixed size.

With the action "Write File" and a simple "Repeater" I have created the file with delimiter ";" character. But now I'm looking for ideas on how to make each column of the file with a fixed width. Any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

former_member196557
Active Contributor
0 Kudos

Hi Michel,

If you want to do it inside the Expression Editor, this will work:

stringleft(<columnvalue> & Local.PadString, Local.ColumnWidth)

Where <columnvalue> is the string you want to pad out to the ColumnWidth length using the PadString.

You can left-pad the value to a fixed length in a similar manner using stringpart() .

Regards, Steve

Answers (1)

Answers (1)

former_member185280
Active Contributor
0 Kudos

I did it this way with xsl way back when:

Regards,
Christian