sj5536 5 Junior Poster in Training

hi,
i have to read value from text file. but the problem is that text file is in the following formate

vlaue1 valu2 valu3
vlaue4 value no
value7 no value

no = there is no value between column
i have to take those value from text file and put in some another file i such way that each value come under right column and there is no fix formate of column while reading that text file i have to ask user to what column is in this file and also there is one or more than one space between column

so plz suggest me the logic or way how i go for this?
thanx