# Writing excel data into Revit

**URL:** <https://forum.dynamobim.com/t/writing-excel-data-into-revit/9387>\
**Category:** Revit\
**Created:** [February 6, 2017, 12:01am UTC](https://forum.dynamobim.com/t/writing-excel-data-into-revit/9387 "2017-02-06T00:01:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![voss836](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@voss836](https://forum.dynamobim.com/u/voss836)\
**Post date:** [February 6, 2017, 12:01am UTC](https://forum.dynamobim.com/t/writing-excel-data-into-revit/9387/1 "2017-02-06T00:01:31Z")

</div>

I’m in the process of setting up Dynamo so it can read in data from excel and upload it into various pieces of equipment in Revit. I’ve found another problem with my current setup.

Here’s what I have at the moment:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/423f9c0115e665f874b1ff5d88d43caaccb80e7c.jpg)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1f094602aed4122bf45fdff7723dac9aa1a8d6b7.jpg)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/9/e99f6ddb1804e385f62d7b61bff1560c6720297d.jpg)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/8647d5f8d1ad1fc51c96f01bf1792e57058e8be4.jpg)

I’ve assigned a parameter “Mark” in Revit, and then I name the AHU’s in this parameter, corresponding to those from the schedule

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/4/149b1663e43972a33d9d245714c67298f026af20.png)

This is all working fine, however it’s not very robust. For example, I have AHU-10-01 up to AHU-10-08 in the schedule. If I want to delete AHU-10-03 in Revit, but leave the column in the schedule in case I want it in the future, it will incorrectly assign the data, as it will just do the first 7 columns, rather than skipping the third column, and continuing on.

Another problem is it also assigns only in alphabetical order. The schedules should almost always be in alphabetical order, however if someone was to add another column to the end, and it wasn’t the last piece of equipment in an alphabetical sense, it would again mess up the order.

What I need is some sort of “check” happening. I have the names of the equipment from excel (seen in the List.Deconstruct (first) box). But I need to go through the equipment in Revit, see if the “mark” value matches a certain column, and then upload the data, but I’m not sure how to do this.

Thanks

---

<div class="post-metadata">

**Author:** ![Andrew\_Hannell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andrew_hannell/32/103315_2.png) [@Andrew\_Hannell](https://forum.dynamobim.com/u/Andrew_Hannell)\
**Post date:** [February 6, 2017, 2:12am UTC](https://forum.dynamobim.com/t/writing-excel-data-into-revit/9387/2 "2017-02-06T02:12:21Z")

</div>

You would need to use either a dictionary (search on the forum) or a database where you can use an SQL query.  
I’d recommend the latter.  
In your case, you would use the AHU mark as the key to join up relevant data.

Refer to

> [@Pairing Data according to criteria - Dictionary](https://forum.dynamobim.com/t/pairing-data-according-to-criteria-dictionary/8763):
>
> Hi All, I’m trying to put some information in a wall from a database I have in an excel sheet. The walls selected (Select Model Elements) have the same pier number (tag) to identify, this information I can get easly (Element.GetParamaterValueByName). Also I get the “Top Constraint” value with the same node to identify the element according to story level. I want to “search” in my Excel Sheet by Pier Number and get the info from Number of Bars and Bar Diameter related to each story. Here is a…

Alternatively, you could use the Datalink tool to synchronise with a database

Andrew

---

<div class="post-metadata">

**Author:** ![voss836](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@voss836](https://forum.dynamobim.com/u/voss836)\
**Post date:** [February 6, 2017, 4:42am UTC](https://forum.dynamobim.com/t/writing-excel-data-into-revit/9387/5 "2017-02-06T04:42:46Z")

</div>

@Andrew_Hannell just got it to work, thanks for your suggestion
