Move item and split BOM

Hi,

I want to move Din Rail and Wire Duct to top most rows and then split the table from other part. How do you do that in macro? Can anyone help out.

Thank you.

SolidworksApi macros