Project Families Export to Excel Nested List Issue

Hi all,
I am trying to export project families to excel.

I have got the export to excel function ok but I got stuck and not able to figure out the way to filter list of list.

I am getting like this in excel after export.

t
but I want like this.

Here is the screenshot of my working script.

any help appreciated.

We can’t read your screenshot but I’d recommend GroupByKey to group all types together. Then you’ll want to create a matching list of families to get the excel structure you’re after. The difference with the family list being that you only have the family name once per type and then add blank strings for each additional type under that family.

The key is that you have to use excel’s data structure. Each sublist of items is a row of values. So each sublist should be the family name (or blank) followed by the type name.

1 Like

Thanks nick. Will try group by key as you explained.
Here is the graph again. Hope it is visible now.

Hi nick
Here is the graph

When taking screen shots of the workspace, you can zoom in so that the nodes are readable and use Workspace from Export as Image menu

You can arrange the data so that you fill the singletons to match the number of items - like a fill with nulls


However I think the better way to go is to have everything filled and use a pivot table

I also did this script for Family Names and types, I have added element ID for you.

Export Family Types.dyn (73.2 KB)

Thank you all very much for the help and guide.

Rajesh
the script you shared is working perfectly.
I think the magic lies in List.ReplaceItemAtIndex python script.
I tried the default List.ReplaceItemAtIndex node is not working in this case.

I have no knowledge of python.

Yeah I too tried to work with levels and lacing in that node but could not do it, the python code for this one is actually very simple, I’m also just beginner learning python, ChatGPT helps a lot, I have learned so much from that.