For a full Excel way to format your data:
First add a few columns:
ROOT -> =ISBLANK([@Parent])
DEPTH -> =IF([@ROOT], 0, VLOOKUP([@Parent], Table1, 4, FALSE) + 1)
// ^ the DEPTH column index
PARENT_PATH -> =IF([@ROOT], "", VLOOKUP([@Parent], Table1, 6, FALSE))
// ^ the PATH column index
PATH -> =IF([@ROOT], "/", CONCAT([@PARENT_PATH],[@Item],"/"))
PLANTUML -> =CONCAT(REPT("*",[@DEPTH]+1), " ", [@Item])
And then, sort the table by the PATH column
Item | Parent | IS_ROOT | DEPTH | PARENT_PATH | PATH | PLANTUML |
Home | | TRUE | 0 | | / | * Home |
About Us | Home | FALSE | 1 | / | /About Us/ | ** About Us |
Privacy Policy | About Us | FALSE | 2 | /About Us/ | /About Us/Privacy Policy/ | *** Privacy Policy |
Sustainability statement | About Us | FALSE | 2 | /About Us/ | /About Us/Sustainability statement/ | *** Sustainability statement |
Products | Home | FALSE | 1 | / | /Products/ | ** Products |
Bread | Products | FALSE | 2 | /Products/ | /Products/Bread/ | *** Bread |
Jam | Products | FALSE | 2 | /Products/ | /Products/Jam/ | *** Jam |
Then you can copy-paste the PLANTUML column directly for plantuml usage.