Convert one text structure to another

Hi,

I’m trying to convert this text structure:


COLA        COLB     COLC     COLD
 1.00000  2.00000  3.00000  4.00000
 5.00000  6.00000  7.00000  8.00000
 9.00000 10.00000 11.00000 12.00000
13.00000 14.00000 15.00000 16.00000

into this text structure:


"comp" 4
1.00000 ;COLA
2.00000 ;COLB
3.00000 ;COLC
4.00000 ;COLD
"comp" 4
5.00000 ;COLA
6.00000 ;COLB
7.00000 ;COLC
8.00000 ;COLD
"comp" 4
9.00000 ;COLA
10.00000 ;COLB
11.00000 ;COLC
12.00000 ;COLD
"comp" 4
13.00000 ;COLA
14.00000 ;COLB
15.00000 ;COLC
16.00000 ;COLD

How to do this? I know how to transpose the values, but I don’t understand how to obtain the needed structure.

Any help will be appreciated!

Thanks,
minopharma