Wall Data to Excel Issue

Hi,

I’m really struggling with exporting a list into excel. The last node before the Excel.WriteToFile organizes the data just like I would like it to, but it will not export properly to excel. I’m sure I have the formatting incorrect, but I’m stuck. I put a couple of images showing the last part of the .dyn file and the error. I’d like to upload the .dyn file because it is huge. Any help would be greatly appreciated; i know i am really close to getting this to work.

3-26-2015 12-25-51 PM
Thank you,

Rob K.

After I wrote my question, I realized that it is written poorly. I will try to be clearer with my question:

I am trying to get select wall type parameter data, organize the disparate data pieces by their associated wall type, and then export that data to excel. As an example: I would like to list all wall types, the materials that are in each wall types, the function of the materials in each wall type and a few other pieces of information in the wall types. I was able to get and organize the data correctly into a list, but when I attach the data of the list to the Excel.WriteToFile node, I get an error. My guess is this error may be caused by having sub-lists, but I’m pretty sure I saw an example where this worked. What’s interesting, is that I can see excel trying to load the data. Is there a format the list has to be in, in order to work in excel? Thanks again for your help.

Rob K.

Hi Rob,

To understand the first error message, have a look at the below image:

2015-03-27_102829

I have a list of lists with varying lengths. If I try to pass that list as it is, I get the first error message: “Index was outside the bounds of the array.”

That means that Excel expects the sub-lists to be the exact same length. With a few nodes, we can take care of that.

The second error message is harder to interpret. It might be hinting to the fact that your sub-lists have sub-lists of their own and Excel is unable to figure out how to parse that information. You might be required to restructure your list hierarchy. Think of each sub list as a new row.

 

Dimitar,

Thank you sooo much for your help. I understand what you are saying and the solution worked perfectly. I don’t understand why excel expects the sub-lists to be the same length, I was assuming that it would have just left the columns blank automatically. Regardless, you got me to the finish line on this one and I thank you very much.

Rob K.