Generate Fixed Width Files

Sep 21 2021 7:34 PM

Hi All,

I would like to generate a  random Fixed Width Files as below.Example:

I have a file something as below:

 

NAME                STATE     TELEPHONE  

SDFFF                WA        418-Y11-4111

DFFFF                  CA        319-Z19-4341

fjffhjh                     IL        219-532-c301

  • First column is 20 characters. It is left aligned. It is padded with spaces. It contains the NAME data within it.
  • Second column is 10 characters. It is left aligned. It is padded with spaces. It contains the STATE data within it.
  • Third column is 12 characters. It is left aligned. It is padded with spaces. It contains the TELEPHONE data within it.

Do we have any tutorials or lbrary to acheive. I appreciate your help.

 

Thanks,

Karthick

 


Answers (1)