On 19/08/2010 4:00 AM, Tim Roberts wrote:
 @©ħα® wrote:
Workbooks.Open fails randomly throws an exception
...
calling logToXLS() occasionally throws the mentioned error at

xl.Workbooks.Open(filePath)

 File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py",

    line 496, in
    __getattr__
       raise AttributeError, "%s.%s" % (self._username_, attr)
    AttributeError: Excel.Application.Workbooks


1)is there any limitation on number of characters on filepath?
2)How this issue can be overcome?

That's not saying that the Open call failed.  That's saying that the
Workbooks object did not contain a function called "Open", which is much
stranger.  Have you used makepy on the Office components to create
wrappers for them? Is this running in an application or in a service? Is it possible, when this happens, that your user already has Excel open
doing something else?  (Although I don't quite know how that would lead
to this.)


Tim: I think it's saying that Excel.Application does not have an attribute "Workbooks", which is equally strange.

OP: Which build of pywin32 are you running? Have you tried a later build?

_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to