Query that returns spreasheet coulums

I have a bunch of parts with child features. There are many versions(instances) of each part. Each instance will have a different value for each feature. I want to display each instance and it's values as a column in a table.

I can return all the Nodes and Instances with:
MATCH tree = (:Node{ name: "P 1" })<-[:CHILD_OF_NODE *0..]-(c:Node) WITH tree, (c)<-[:INSTANCE_OF_NODE]-(:Instance) as instance return tree, instance

Two columns are returned. In this example both of my Instances are combined in the second column. How do I return a column for each instance?

Hi [r.chevalier335],

If the graph has a hierarchical structure it might help to create a Level property in the nodes.

Then you can write cypher query and export a csv in Excel, example:
MATCH (n)-[REL]->(x) RETURN id(n)AS IDA, n.level as LevelLeft, id(REL) AS IDREL, TYPE(REL) AS RELATION , id(x) AS IDB, x.level as LevelRight

In Excel you can use a pivot table with level properties in column.



Thanks asperlinga.

I wish to display the results on a web page LIKE a spreadsheet. I do have a level property but didn't show it here for clarity.