Okay, let's take a step back.
Post:
- Exactly the error message you are getting, with the full details/stacktrace attached.
- Exactly the code you're running in the script console/on your button/whatever.
- Exactly the code you've got in the project library, apparently under the
EXCEL
package.
Post all of those here as preformatted text, so that indentation information (crucial to Python) is not lost.
Until you do that, we're all just taking stabs in the dark trying to help you.