# Export Data to Excel error and strange output

**URL:** <https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171>\
**Category:** Revit\
**Created:** [April 17, 2024, 4:50pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171 "2024-04-17T16:50:21Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![lashaw13](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lashaw13](https://forum.dynamobim.com/u/lashaw13)\
**Post date:** [April 18, 2024, 12:55pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/21 "2024-04-18T12:55:34Z")

</div>

I’m not versed enough in Dynamo to know exactly how to do that…sounds like a good idea though! Could you show me the nodes to use? Unfortunately I’m not a python-er either.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 18, 2024, 12:57pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/22 "2024-04-18T12:57:51Z")

</div>

Saw a typo in how I formatted my text. Basically copy all of the stuff in the code sample into a new code block (double click on the canvas to get one of those). Then wire in the results of your datashapes UI++ node correctly and you should be all set.

Give it a shot and post back if you get stuck. I’m not at a PC to build anything directly for the rest of the day though.

---

<div class="post-metadata">

**Author:** ![lashaw13](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lashaw13](https://forum.dynamobim.com/u/lashaw13)\
**Post date:** [April 18, 2024, 1:10pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/23 "2024-04-18T13:10:34Z")

</div>

It’s not working. The Code Block is giving the red triangle error.

---

<div class="post-metadata">

**Author:** ![lashaw13](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lashaw13](https://forum.dynamobim.com/u/lashaw13)\
**Post date:** [April 18, 2024, 1:20pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/24 "2024-04-18T13:20:09Z")

</div>

![Code Block Error](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2ac0683c07c28eeadb5d1d6e7f86ca0e9b8d8209.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 18, 2024, 1:23pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/25 "2024-04-18T13:23:03Z")

</div>

Replace the quotes with ones you type yourself.

Also if it still fails try making the first line ‘extension = String.EndsWith(fileName, “”, “.xlsx”);`

---

<div class="post-metadata">

**Author:** ![lashaw13](https://avatars.discourse-cdn.com/v4/letter/l/cc9497/32.png) [@lashaw13](https://forum.dynamobim.com/u/lashaw13)\
**Post date:** [April 18, 2024, 2:35pm UTC](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171/26 "2024-04-18T14:35:37Z")

</div>

Success!! The code block still threw an error but the output excel file was created in the correct directory and the numbers were not separate digits.

Thank you for your help!!!

[Previous page](https://forum.dynamobim.com/t/export-data-to-excel-error-and-strange-output/100171.md?page=1)
