Writing data to specific rows in Excel with Dynamo

Hi there, I’m very new to Dynamo and trying to write a script to export quantities from my furniture schedules from Revit, but I haven’t been able to export the data in the way I want it, I would appreciate any help!

This is a large scale project with 8 levels and over 200 different furniture types, and the way we would like the schedule to read it’s sorted by furniture type and with the quantities of each type per level.

The way I have approached this it’s by creating a list per each level, then sorting these lists by type mark and then getting a count.
Following that, I created an overall list with all the type marks sorted by alphabetic order (this is the order I want them to come out in excel) - then I use that list and I compare it to the lists I’ve got by level (with the List.AllIndicesOf node) in a way that it gives me the position of each type mark in the overall schedule.

Finally, this is when I get stuck: I have my quantities in the 2nd list and I know which row, in excel, each of them belong to, as per my 1st list.
Example: 78 should appear in Row 59

I thought it would be pretty straight forward to map these values, but with the built-in Data.ExportExcel node I can only seem to get a start row and not a series of specific rows… is this something that can be done with Packages?

Or perhaps I have approached my issue all wrong? I would appreciate any suggestions!

Thank you very much,
Ana

Just to clarify, this what I meant with having the schedule sorted by furniture type and the quantities of each type per level:

Welcome anabc!
If your schedule is formatted like you want the data to look in excel, then try using the bimorph.GetScheduleData node. This extracts the data from the schedule by rows and you can then import into excel in the exact same format using the Data.ExportExcel node you are currently using.

image

1 Like

@anabc Try something like this with @L1:
image

Also make sure the length of both the lists is same. In your image you are providing 12 quantities for 11 indices.

Thanks @AmolShah that did the trick! I guess I was having an issue with the levels.
Now it works perfectly!

1 Like