Hi All,
One of my coworkers had a SuperTrend file he wanted to re-arrange for better importing into Excel.
The original data looked something like this: (one line per pen in the Supertrend)
1 23/01/2012 13:53:39.783 1.000000
2 23/01/2012 13:53:39.783 2.000000
3 23/01/2012 13:53:39.783 3.000000
4 23/01/2012 13:53:39.783 4.000000
5 23/01/2012 13:53:39.783 5.000000
6 23/01/2012 13:53:39.783 6.000000
7 23/01/2012 13:53:39.783 7.000000
1 23/01/2012 13:53:49.783 1.100000
2 23/01/2012 13:53:49.783 2.200000
3 23/01/2012 13:53:49.783 3.300000
4 23/01/2012 13:53:49.783 4.400000
5 23/01/2012 13:53:49.783 5.500000
6 23/01/2012 13:53:49.783 6.600000
7 23/01/2012 13:53:49.783 7.700000
And he wanted each line to be one point in time w/the pens as columns like this:
23/01/2012,13:53:39.783,1.000000,2.000000,3.000000,4.000000,5.000000,6.000000,7.000000,
23/01/2012,13:53:49.783,1.100000,2.200000,3.300000,4.400000,5.500000,6.600000,0.000000,
I wrote the attached strategy (which I ran on his file on this PC using PAC Sim) – no actual controllers were harmed or used.
I thought this might be a helpful example, especially if you also want to convert a SuperTrend file, but perhaps if you’re interested in doing some other kind of file conversion or string parsing.
-OptoMary
SuperTrendParser.RunThisOnPACSim.zip (5.66 KB)