# Old data stays in Excel list when data is removed from Revit

**URL:** <https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146>\
**Category:** Revit\
**Tags:** revit, bumblebee, excel, dynamo\
**Created:** [November 1, 2017, 2:05pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146 "2017-11-01T14:05:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkV](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarkV](https://forum.dynamobim.com/u/MarkV)\
**Post date:** [November 1, 2017, 2:05pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/1 "2017-11-01T14:05:40Z")

</div>

Hello People,

When i use the node “Write Excel” from Bumblebee, the following problem occurs:

1. The data is well written from Revit to Excel 👍🏼 (see figure1)

2. But when i delete ‘12.1’ from Revit, and I run Dynamo again, then the list is no longer OK (see picture2)

3. I would like to see the list without the old data (Figure 3)

Is there a way to get it?

 ![totaal vraag](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/6/66d0cf4b0397f47ff62af7e739ec23e8f9af5e87.PNG)

---

<div class="post-metadata">

**Author:** ![visualizor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/visualizor/32/29555_2.png) [@visualizor](https://forum.dynamobim.com/u/visualizor)\
**Post date:** [November 1, 2017, 2:27pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/2 "2017-11-01T14:27:50Z")

</div>

When you delete the data, the next row gets bumped up to the first row so the node always write from A1 in excel.  
Try to insert a null item or see if the bumblebee node can start from NOT A1 cell when writing

---

<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:** [November 1, 2017, 2:31pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/3 "2017-11-01T14:31:42Z")

</div>

Or clear the contents of the excel spreadsheet prior to writing. Or write to a new sheet by changing the sheet name to include a date/time string.

---

<div class="post-metadata">

**Author:** ![MarkV](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarkV](https://forum.dynamobim.com/u/MarkV)\
**Post date:** [November 1, 2017, 5:17pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/4 "2017-11-01T17:17:24Z")

</div>

> [@jacob.small](#):
>
> Or clear the contents of the excel spreadsheet prior to writing.

That’s a good one!  
Do you have any idea how to do this, or do you maybe have an example ?

> [@jacob.small](#):
>
> Or write to a new sheet by changing the sheet name to include a date/time string.

That’s not an option for me, because every time the data changes in Revit, a new Exelsheet will be created?

---

<div class="post-metadata">

**Author:** ![MarkV](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarkV](https://forum.dynamobim.com/u/MarkV)\
**Post date:** [November 1, 2017, 5:22pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/5 "2017-11-01T17:22:18Z")

</div>

> [@visualizor](#):
>
> When you delete the data, the next row gets bumped up to the first row so the node always write from A1 in excel.
> 
> Try to insert a null item or see if the bumblebee node can start from NOT A1 cell when writing

Thanks!

thats correct, but what do you mean with: NOT writing from A1?  
if i start writing from another cell, The same problem occurs?

---

<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:** [November 1, 2017, 5:57pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/6 "2017-11-01T17:57:04Z")

</div>

> [@MarkV](#):
>
> That’s a good one!
> 
> Do you have any idea how to do this, or do you maybe have an example ?

Try the built in excel.writetofile node which has a value ‘overwrite’ which I believe will remove all data each time it writes. You will lose formatting though as a result. If that doesn’t work you could write twice - once with a very large set of empty strings.

> [@MarkV](#):
>
> That’s not an option for me, because every time the data changes in Revit, a new Exelsheet will be created?

Yes, but in a new sheet not a new file. You can have a printing view in the same file and change the reference to the new data each time you run the script. This way you won’t have to reformat or change much, and can always go back if the design reverses to a previous point. Only takes just some references which can be updated in excel with like 5 seconds to change if you know how to do it.

---

<div class="post-metadata">

**Author:** ![MarkV](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarkV](https://forum.dynamobim.com/u/MarkV)\
**Post date:** [November 2, 2017, 1:25pm UTC](https://forum.dynamobim.com/t/old-data-stays-in-excel-list-when-data-is-removed-from-revit/16146/7 "2017-11-02T13:25:45Z")

</div>

> [@jacob.small](#):
>
> Try the built in excel.writetofile node which has a value ‘overwrite’ which I believe will remove all data each time it writes. You will lose formatting though as a result.

I have already tried that. Indeed, the data is completely replaced. That’s good, But when the data changes in Revit and the script is re-running, then there’s another problem:

I want to link those cells into another sheet (same file) (template) then the cells are no longer recognized. (see picture)

![Knipsel](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/1/71a8edb89dd0fa2346c5e6255dbe71cf12ce6906.PNG)

Instead of, ‘sheet1’, there will be #VERW, so the data is gone 😕

> [@jacob.small](#):
>
> If that doesn’t work you could write twice - once with a very large set of empty strings.

I have no idea how to make that happen.  
Is there a way to do this in the same dynamo file, so I can only run the entire script 1 time?  
And how do I give priority to first running the empty list?

Thank you in advanced for all the answers!
