Need code from node for excel

I hope that somebody can help me.
I want to create a list with code in excel for createing viiew filters for a certain project.
Do i just copy the highlighted tect into revit or isn’t this the rigt way to do this?

Excel.WriteToFile will move data to excel, but you’ll likely want to do some data conversion and more gathering first.

can you please post an example of what you want your excel file to look like?

Thanks

The routing centre (see screenshot) is mostly connected through excel file
The only thing i can’t get wright is the View Templates selector and the Fill Paterns selector out of the way.
Both the node i want to put in Excel lije the rest.

The problem is the rest worked with simple text but the above named i couldn’t get that to work

Hope i made a bit more clear what i want

Is this what you’re looking for? You can record the name or the ID in Excel this way, rather than the object.

I think i can do something with this
only then i need to combine it so i get the highlihted text like shown in the screenshot

What is your end goal? Why do you think you need the highlighted text specifically?