I'm looking for a way to group BOM components for an electronics BOM. Currently my program outputs a CSV table like this for example:
[TABLE="width: 200"]
<tbody>[TR]
[TD]Component[/TD]
[TD]Part Number[/TD]
[/TR]
[TR]
[TD]C1[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]C2[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]R1[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]R2[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]R3[/TD]
[TD]33333333[/TD]
[/TR]
[TR]
[TD]U1[/TD]
[TD]44444444[/TD]
[/TR]
[TR]
[TD]U2[/TD]
[TD]44444444[/TD]
[/TR]
</tbody>[/TABLE]
I would like the result to group components together by unique part numbers, like the following:
[TABLE="width: 100"]
<tbody>[TR]
[TD]Component[/TD]
[TD]Part Number[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]C1, C2[/TD]
[TD]11111111[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]R1, R2[/TD]
[TD]22222222[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]R3[/TD]
[TD]33333333[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]U1, U2[/TD]
[TD]44444444[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
What would be the easiest way to do this?
[TABLE="width: 200"]
<tbody>[TR]
[TD]Component[/TD]
[TD]Part Number[/TD]
[/TR]
[TR]
[TD]C1[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]C2[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]R1[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]R2[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]R3[/TD]
[TD]33333333[/TD]
[/TR]
[TR]
[TD]U1[/TD]
[TD]44444444[/TD]
[/TR]
[TR]
[TD]U2[/TD]
[TD]44444444[/TD]
[/TR]
</tbody>[/TABLE]
I would like the result to group components together by unique part numbers, like the following:
[TABLE="width: 100"]
<tbody>[TR]
[TD]Component[/TD]
[TD]Part Number[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]C1, C2[/TD]
[TD]11111111[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]R1, R2[/TD]
[TD]22222222[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]R3[/TD]
[TD]33333333[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]U1, U2[/TD]
[TD]44444444[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
What would be the easiest way to do this?