# Cannot Clear Excel Contents with Bumblebee Node

**URL:** <https://forum.dynamobim.com/t/cannot-clear-excel-contents-with-bumblebee-node/17813>\
**Category:** Revit\
**Tags:** archi-lab, excel\
**Created:** [January 2, 2018, 8:12pm UTC](https://forum.dynamobim.com/t/cannot-clear-excel-contents-with-bumblebee-node/17813 "2018-01-02T20:12:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pmacknight](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@pmacknight](https://forum.dynamobim.com/u/pmacknight)\
**Post date:** [December 19, 2019, 9:36pm UTC](https://forum.dynamobim.com/t/cannot-clear-excel-contents-with-bumblebee-node/17813/2 "2019-12-19T21:36:08Z")

</div>

I know this is a late time coming, and you may have moved on or since found a solution, but for anyone who stumbles upon this, just like I did, when recently having the same issues, I’m posting an answer here as an interim solution while I notify the Bumblebee’s author of the issue.

The issue occurs in line 105 of the python script driving the Clear Contents node of the plugin. The line reads `if os.path.isfile(str(filePath)):` inside of a `try:` statement. The problem is, the only time `os` is imported is in line 18: `from os import path`. This is an issue because line 105 has no idea what namespace `os` is, only the `path` namespace from `os`, and so it fails, causing the `except:` clause to kick into play. This bypasses any write operation onto the file and immediately ends the script and releases Excel com properties. Unfortunately, there’s no line setting a message override in that `except:` clause, so “Success!” is all that displays from the node dispite the overall operation failure.

The Solution:  
There’s a few ways to handle this, but effectively you have to eliminate the “unknown” aspect of the `os` namespace.

Option A:  
Remove “`os.`” entirely from lines 18 and 105.  
NOTE: Least stable and readable due to lack of specificity of the name “path”

Option B:  
Update line 18 to read as `from os import path as ospath`, then update line 105 from `os.path` to `ospath`.  
NOTE: Recommended option.

Option C:  
Change line 18 to `import os`.  
NOTE: This would import all of the os namespace, which is otherwise unused. This option is not recommended due to possible and untested performance issues.

---

_[View the full topic](https://forum.dynamobim.com/t/cannot-clear-excel-contents-with-bumblebee-node/17813)._
