WinError 87 when running xlwings

Viewed 116

I have been working with xlwings to run python from an excel workbook - the xlwings module had been worked fine, but now I am getting this error. Has anyone come across this before? This really has put me at a standstill. Thanks in advance.


Error

Traceback (most recent call last):

File "", line 1, in

File "c:\users\user\documents\python\tptdevenv\tpt\TPT.py", line 15, in main

wb = xw.Book.caller()

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings\main.py", line 613, in caller

return cls(impl=app.books[name].impl)

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings\main.py", line 378, in books

return Books(impl=self.impl.books)

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings_xlwindows.py", line 411, in books

return Books(xl=self.xl.Workbooks)

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings_xlwindows.py", line 327, in xl

self._xl = get_xl_app_from_hwnd(self._hwnd)

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings_xlwindows.py", line 236, in get_xl_app_from_hwnd

ptr = accessible_object_from_window(child_hwnd)

File "C:\Users\User\Anaconda3\lib\site-packages\xlwings_xlwindows.py", line 209, in accessible_object_from_window

res = oledll.oleacc.AccessibleObjectFromWindow(

File "C:\Users\User\Anaconda3\lib\ctypes_init_.py", line 451, in getattr

dll = self._dlltype(name)

File "C:\Users\User\Anaconda3\lib\ctypes_init_.py", line 381, in init

self._handle = _dlopen(self._name, mode)

OSError: [WinError 87] The parameter is incorrect

Press Ctrl+C to copy this message to the clipboard.

OK

0 Answers
Related