Can't import UDF from python to Excel using xlwings
Question:
I am using python to write a function and then using xlwings I am trying to import it into Excel but I faced the following error:
My xlwings version is 0.28.5
, and python’s is 3.10
, and I am using Excel 2013. also both
xlwings32-0.28.5.dll
and xlwings64-0.28.5
are in the same folder as the python3.10.exe
the name of the python file and Excel file are the same as instructed by the documentation
I have also tried specifying the python interpreter path in the interpreter box located in the xlwings ribbon in Excel but with no results. I have read the following issues but also with no result:
my python function :
finally I have obviously added the xlwings add-in in Excel, and I trust access to the VBA project object model
NOTE: Run Python works just fine with no error.
so, can anyone point to what I am doing wrong or missing?
thanks in advance.
Answers:
I have solved this by uninstalling the python version that I have and the reinstalling it using anaconda3 distribution. after that from the anaconda prompt type xlwings addin install
and every thing worked fine.
I am using python to write a function and then using xlwings I am trying to import it into Excel but I faced the following error:
My xlwings version is 0.28.5
, and python’s is 3.10
, and I am using Excel 2013. also both
xlwings32-0.28.5.dll
and xlwings64-0.28.5
are in the same folder as the python3.10.exe
the name of the python file and Excel file are the same as instructed by the documentation
I have also tried specifying the python interpreter path in the interpreter box located in the xlwings ribbon in Excel but with no results. I have read the following issues but also with no result:
my python function :
finally I have obviously added the xlwings add-in in Excel, and I trust access to the VBA project object model
NOTE: Run Python works just fine with no error.
so, can anyone point to what I am doing wrong or missing?
thanks in advance.
I have solved this by uninstalling the python version that I have and the reinstalling it using anaconda3 distribution. after that from the anaconda prompt type xlwings addin install
and every thing worked fine.