I currently have a large tab delimited data set that looks like this (n is simply a number, there are more than 4 Headers), an initial Headers column that repeats, followed by at most, 2 columns of data (sometimes only one):
Input file:
Hdr1 A1 B1
Hdr2 A2 B2
Hdr3 A3 B3
Hdrn An Bn
Hdr1 C1
Hdr2 C2
Hdr3 C3
Hdrn Cn
Hdr1 D1 E1
Hdr2 D2 E2
Hdr2 D3 E3
Hdrn Dn En
I need to transpose and transform the data so output looks similar to this (so the repeating headers are removed and the data remains):
Hdr1    Hdr2    Hdr3    Hdrn
A1  A2  A3  An
B1  B2  B3  Bn
C1  C2  C3  Cn
D1  D2  D3  Dn
E1  E2  E3  En
Any ideas for how to do this with an Optimised EmEditor javascript Macro would be much appreciated.
 
                        
Here is a JavaScript macro for you:
To run this, save this code as, for instance,
Transpose.jsee, and then select this file from Select... in the Macros menu. Finally, select Run Transpose.jsee in the Macros menu.