# String Replace does not work when loading values from excel

**URL:** <https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [June 6, 2024, 1:12pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679 "2024-06-06T13:12:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.stojanovic25HQS](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@m.stojanovic25HQS](https://forum.dynamobim.com/u/m.stojanovic25HQS)\
**Post date:** [June 6, 2024, 1:12pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/1 "2024-06-06T13:12:03Z")

</div>

Greetings,

String.Replace wont go through when i load values from excel.

If i just put string node with value on red crosses all goes trough.

Example of value in excel:  
first row: Furniture  
second row: FUR

 ![Snimka zaslona 2024-06-06 150800](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/6/d64e414b5826c2eaed5bc1971e0ce167c8adc42f.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 3:02pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/2 "2024-06-06T15:02:22Z")

</div>

Are you wanting to replace every instance of every search condition? That node is only setup to replace one string at a time. You would need to repeat the nodes for every condition but that can quickly become unmanageable. Python would be a much better option.

---

<div class="post-metadata">

**Author:** ![m.stojanovic25HQS](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@m.stojanovic25HQS](https://forum.dynamobim.com/u/m.stojanovic25HQS)\
**Post date:** [June 6, 2024, 3:16pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/3 "2024-06-06T15:16:28Z")

</div>

Thanks.

Yea, i want to keep a list of old/new names in excel and just run it through dynamo.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 4:02pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/4 "2024-06-06T16:02:34Z")

</div>

Are you replacing the entire string or just specific substrings? Is it just a list of old names and what the new name should be? You don’t even need `String.Replace` for that. A dictionary or a filter would work better.

---

<div class="post-metadata">

**Author:** ![m.stojanovic25HQS](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@m.stojanovic25HQS](https://forum.dynamobim.com/u/m.stojanovic25HQS)\
**Post date:** [June 6, 2024, 6:13pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/5 "2024-06-06T18:13:30Z")

</div>

I have a list for whole strings and list for substrings also. So both.

Can you point to towards which node to use? I can get dictionary but i dont know how to change name of a family with it.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 6, 2024, 6:35pm UTC](https://forum.dynamobim.com/t/string-replace-does-not-work-when-loading-values-from-excel/101679/6 "2024-06-06T18:35:31Z")

</div>

The dictionary would be for remapping new names. If you still need to replace individual substrings it sounds like you’ll want to use Python.
