Writing Nested Lists to Excel - Possible?

Hello,

I need help writing nested lists to excel for a varying set of list data (see attached images).


The goal here is to have excel look like the following:

The blue numbers to the side correspond to the number of lists organized @ the L3 level with each element within the L3 level of the list having (8) unique values that need to be written to excel. After every item has been written, the excel file needs to move over (8) columns and write the new data.

It almost feels like I need a for loop in dynamo to do this. Is it possible to write for loops in dynamo? For i 0:count of lists and changing the start column of based based on i*8?

Thanks in advance,
S&T

For lists are doable (look into the design script language guide) but I don’t believe they are needed here.

What have you tried with the excel.writetofile node?

Jacob,

When I use the excel.writetofile node, I only get the last set of entries at list level 3. Is there a way to code that the starting column shifts after moving over a sublist? I think the data is being overwritten for the number entries in at list 3 (always placing data at row 2, column 2)

The above code yields the last element only:

@austin.guter

XML might be what you want.
And Excel can read XML.

@m.rijsmus

I am unfamiliar with XML and how that would be able to be read by an excel file.

Any references I could review?

Thanks,
S&T

@austin.guter

file.txt (14.5 KB)
readXML2.dyn (5.9 KB)
readXML1.dyn (11.7 KB)

Ok, since the forum doesn’t allow me to upload xml files, i renamed it to file.txt.
if you rename it back to file.xml and open it in notepad you can see the structure of the file
if you open it in excel you will see normal colums and rows.
i also attached some dynamo files to access the xml file.
there are nodes for reading and writing xml in Lunchbox and Bakery

@m.rijsmus

Appreciated. I will review.