Hello! I am trying to figure out a way to sort raw data into a desired format.
This is the format of the raw data:
[TABLE="class: grid, width: 193"]
<tbody>[TR]
[TD="colspan: 3, align: center"]Raw Data[/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Parameter[/TD]
[TD="align: center"]Value[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]25[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]35[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]40[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]45[/TD]
[/TR]
</tbody>[/TABLE]
This is the format that I want after the data is sorted:
[TABLE="class: grid, width: 247"]
<tbody>[TR]
[TD="colspan: 4, align: center"]Sorted Data[/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]Flow[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"]45[/TD]
[/TR]
</tbody>[/TABLE]
Any suggestions are appreciated. Thanks!
This is the format of the raw data:
[TABLE="class: grid, width: 193"]
<tbody>[TR]
[TD="colspan: 3, align: center"]Raw Data[/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Parameter[/TD]
[TD="align: center"]Value[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]10[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]25[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]35[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]40[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]Flow[/TD]
[TD="align: center"]45[/TD]
[/TR]
</tbody>[/TABLE]
This is the format that I want after the data is sorted:
[TABLE="class: grid, width: 247"]
<tbody>[TR]
[TD="colspan: 4, align: center"]Sorted Data[/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Temp[/TD]
[TD="align: center"]Press[/TD]
[TD="align: center"]Flow[/TD]
[/TR]
[TR]
[TD="align: center"]A100[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD="align: center"]B200[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]C300[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"]45[/TD]
[/TR]
</tbody>[/TABLE]
Any suggestions are appreciated. Thanks!