From: Mmcolli00 Mom Date: 2009-04-21T05:55:34+09:00 Subject: Re: create a text file with data custom positioned? sprintf didn't work, it did position them however it positioned them according to my last data element in that line so the columns were not straight. f1.puts sprintf("%0s", @SPNHash.values_at(@fromField)+sprintf("%13s", @fromIndex)+sprintf("%20s", @SPNHash.values_at(@toField).to_s)+sprintf("%28s", @toIndex) output example: Aerwrerereres 0 sfendki0098 0 REFED 0 Derdtd 12 d34dData 0 dedDate 0 -- Posted via http://www.ruby-forum.com/.