How many is "many"? Is it always the same number?
> filePath=os.path.join(os.getcwd(),fileNameXLS)
> xl = win32com.client.Dispatch("Excel.Application")
What is the point of executing this more than once? IIUC this is
starting up Excel each time ....
> sh=xl.Workbooks.Open(filePath)
You probably mean "wb = " in the above line.
I suggest that (1) you quote the actual code that you ran and (2) ask on
the pywin32 mailing list ... the answer is more likely to be obtained there.
packages\win32com\client\dynamic.py",
line 496, in
__getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: Excel.Application.Workbooks
--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.
[snip]
>
> calling logToXLS() throws the mentioned error.
> 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
>
>
> its random behaviour .
>
As advised earlier, you'll get better results by asking on the
python-win32 mailing list.
Send your message to python...@python.org
Find out more about the mailing list at
http://mail.python.org/mailman/listinfo/python-win32