# Writing revit data into excel

**URL:** <https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993>\
**Category:** Revit\
**Created:** [October 23, 2016, 9:08am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993 "2016-10-23T09:08:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 9:08am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/1 "2016-10-23T09:08:48Z")

</div>

Hi,

Please see attached images.

All the shared parametrs I’m trying to write into excel are instance parameters. Not sure why the connection size did not write into excel. Other issue is data from revit is different from excel.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/a/a2ffce8df71450da759840ca6359f0888855a29f.PNG)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/4/469a28419a367f6353593eaba20cada37a0449eb.PNG)

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 9:14am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/2 "2016-10-23T09:14:57Z")

</div>

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/e/e60b7d5ff600a74f9fd6acc6cb3b289974c27124.PNG)

Refer to the attached for the updated output.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [October 23, 2016, 10:29am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/3 "2016-10-23T10:29:37Z")

</div>

Hi Benjamin,

Could you drop your files here so that we can provide you better and quick solution. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![GregX](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gregx/32/56837_2.png) [@GregX](https://forum.dynamobim.com/u/GregX)\
**Post date:** [October 23, 2016, 10:43am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/4 "2016-10-23T10:43:52Z")

</div>

Do the _Element.GetParameterValueByName_ nodes output anything?

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 11:24am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/5 "2016-10-23T11:24:05Z")

</div>

It does output the value of mark, airflow and presure drop (as per last attachment) but the value for airflow and pressure drop are incorrect. On the other hand, the value for connection size is blank.

@Kulkul, i will upload the files later this noon.

---

<div class="post-metadata">

**Author:** ![GregX](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gregx/32/56837_2.png) [@GregX](https://forum.dynamobim.com/u/GregX)\
**Post date:** [October 23, 2016, 11:29am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/6 "2016-10-23T11:29:40Z")

</div>

The values may be incorrect because of internal(?) units of revit or dynamo…i think that if you divide the value in dynamo by the value revit you will get a constant.  
Could you try using Object to String to convert the values in strings before feeding them in the excel? I don’t know if that’s the case but let’s try it

---

<div class="post-metadata">

**Author:** ![JeffT](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@JeffT](https://forum.dynamobim.com/u/JeffT)\
**Post date:** [October 23, 2016, 11:59am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/7 "2016-10-23T11:59:03Z")

</div>

@bvm76  
What’s up  
Take a look at this script, to get all the information from the schedule to excel  
i got it from Mr. @Lknapton

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/0632655c912cb9eb00eb6612efdac736f7009dbd.png)

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 3:24pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/8 "2016-10-23T15:24:40Z")

</div>

Hi Guys,  
@Kulkul, file uploaded as requested.  
@GregX, introducing Object to Excel before feeding to excel did not help  
@JeffT, please see below image. It did not create schedule in excel. Not sure what I missed here?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/0e5146caa4c9d444fcbc7bd386dcf6fc55d79046.PNG)

[Air Terminal Schedule.dyn](https://forum.dynamobim.com/uploads/short-url/NSyOar2Fu3sibbm0RpG5hpaLVU.dyn) (7.8 KB)

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 3:28pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/9 "2016-10-23T15:28:28Z")

</div>

@JeffT, I changed the [Level.Name](http://Level.Name) to [Element.Name](http://Element.Name) but still nothing is happening.

---

<div class="post-metadata">

**Author:** ![Alberto\_Tono](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alberto_tono/32/15925_2.png) [@Alberto\_Tono](https://forum.dynamobim.com/u/Alberto_Tono)\
**Post date:** [October 23, 2016, 3:31pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/10 "2016-10-23T15:31:08Z")

</div>

Try to import REVITAPI and not Protogeometry in Python

```
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
```

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [October 23, 2016, 3:39pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/11 "2016-10-23T15:39:07Z")

</div>

@bvm76 drop rvt file.

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 4:07pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/12 "2016-10-23T16:07:14Z")

</div>

@Kulkul, please see link to download the revit file as requested.

> **[WeTransfer](https://wetransfer.com/downloads/fad8add4a12f6414f9f7897133f084fd20161023160519/ce1959)**
>
> WeTransfer is the simplest way to send your files around the world

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 23, 2016, 4:15pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/13 "2016-10-23T16:15:07Z")

</div>

@Alberto_Tono, great it’s now working. The values are now also correct. But I still want to find out why my original graph is not working.

---

<div class="post-metadata">

**Author:** ![GregX](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gregx/32/56837_2.png) [@GregX](https://forum.dynamobim.com/u/GregX)\
**Post date:** [October 23, 2016, 4:33pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/14 "2016-10-23T16:33:36Z")

</div>

Could it simply be the “overwrite” input in the first graph? Will it work with a new excel file?  
EDIT: I tried it with Revit 2016 R2 and it works. Maybe some dynamo nodes won’t work in R2014.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c6d5a90f9e7e15b7476e22ea52e369361b2596b8.png) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/d010a4c7ac2c5b123b64169b1f27203a867d97ee.png)

Units are in imperial I think…forgot to change them, for the (easy) Size you just have to divide by 0.3048, for the other ones I’m too lazy to find out, but a simple calculator will do

---

<div class="post-metadata">

**Author:** ![JeffT](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@JeffT](https://forum.dynamobim.com/u/JeffT)\
**Post date:** [October 24, 2016, 4:36am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/15 "2016-10-24T04:36:53Z")

</div>

@bvm76  
What’s up, sorry i didn’t notice when you write back  
ok if you check my Python

> ```
> clr.AddReference("RevitAPI")
> import Autodesk
> from Autodesk.Revit.DB import *
> 
> ```

but yours

> ```
> clr.AddReference("ProtoGeometry")
> from Autodesk.DesignScript.Geometry import *
> 
> ```

try to make it same  
Best Regards,

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 24, 2016, 5:20am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/16 "2016-10-24T05:20:20Z")

</div>

Thanks for sharing the code jeff, it’s now working.

---

<div class="post-metadata">

**Author:** ![JeffT](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@JeffT](https://forum.dynamobim.com/u/JeffT)\
**Post date:** [October 24, 2016, 6:30am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/17 "2016-10-24T06:30:03Z")

</div>

Welcome 🙂

---

<div class="post-metadata">

**Author:** ![Tomasz\_Puchala](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tomasz\_Puchala](https://forum.dynamobim.com/u/Tomasz_Puchala)\
**Post date:** [October 24, 2016, 7:03am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/18 "2016-10-24T07:03:17Z")

</div>

You can try to add stringFromObject node between transpose and excel nodes. “Usually” it helps.

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 25, 2016, 8:37pm UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/19 "2016-10-25T20:37:03Z")

</div>

Thank you all guys for your help!

---

<div class="post-metadata">

**Author:** ![bvm76](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bvm76](https://forum.dynamobim.com/u/bvm76)\
**Post date:** [October 29, 2016, 6:55am UTC](https://forum.dynamobim.com/t/writing-revit-data-into-excel/6993/20 "2016-10-29T06:55:49Z")

</div>

@JeffT, i tried to edit the python node so i can write my data into specific sheet of existing excel file rather than creating a new file but with no luck. I would be grateful if can show how to do it.
