Extract the mates data in excel

Hello everybody,

I need you. I try to extract the mates' data in excel. For the moment I can extract the names of the part and for each part, I can extract the mates' data. But when I extract the mates' data in my Excel is not very readable because all data are extracted but we can't see with which part.

Like this :

Now I try to display for each mate with which piece it is in mates. Like this:

I join you my macro if you have any idea do not hesitate to contact me.

SolidworksApi macros