Hi,
I have got a problem with code that opens my Excel workbook and try to
perform some operations:
self.app = Dispatch('Excel.Application')
self.app.Workbooks.Open('someexcel.xls')
print(self.app.ActiveWorkbook.Sheets('test').Range('D4'))

I receive AttributeError, but I know what caused it. My workbook has
pivot tables that are refreshed on workbook opening, so it takes some
time to open and Workbook.Open() function returns immediatly without
waiting. If I add some time.sleep() between 2nd and 3rd line, it works
fine.

What is the best way to solve this problem? Are there any other ways
to open workbook (sync open)? Is there any way to detect if file is
fully opened?

Cheers,
Jacek
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to