getting going with Xlwings 0.30.15 on Excel 2019

40 views Asked by At

I've installed Xlwings 0.30.15 into Excel 2019 and then went to its ribbon and entered the path (L:\refinitiv\python\mb.py) to the UDF Modules and the Interpreter. Data entered was tripled checked as correct.

When I click "import functions" I get a popup cmd window and an Excel window, both containing errors and when I try to use any function from the python field I get a "#NAME" error in excel.

I also have a Refinitiv Excel add-in installed and functioning correctly. This is a COM add-in. I have checked with Refinitiv and there does not appear to be a compatibility issue as they publish articles like "How to integrate Financial Data from Refinitiv Data Platform to Excel with Xlwings" (which didn't address my issue).

The content of the CMD prompt window is:

xlwings server running, clsid={4CCCB3D7-7D80-4154-A661-62E0EC20FA00}, event loop on 23316
pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-           packages\win32com\server\policy.py", line 305, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\win32com\server\policy.py", line 310, in _invoke_
   return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\win32com\server\policy.py", line 639, in _invokeex_
    return func(*args)
       ^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\xlwings\com_server.py", line 231, in Call
    return ToVariant(getattr(obj, method)(*pargs, **kwargs))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\xlwings\udfs.py", line 703, in import_udfs
    module = get_udf_module(module_name, xl_workbook)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\xlwings\udfs.py", line  381, in get_udf_module
   module = import_module(module_name)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'L:\\refinitiv\\python\\mb'

Any clues or clarifications would be most welcome and appreciated!

Mark

0

There are 0 answers