I want to create a user defined function written in Python. Then I want to compile it to a dll, and distribute it and call in EXCEL vba on another computer which doesn't have python installed.
For example, I want to create a function in Python:
def add(a,b): return a+b
Then, compile it and export it as a dll. On another computer without Python, I can to import this function in EXCEL vba and use it. How to do it?
Thanks,
in excel go to the vbe editor Tools>References browse your dll and add a reference, this will make available your dll functions in vba.
as per making it a dll, look what jb suggest here How to compile a Python package to a dll and follow the comments on that as well.
another option would be like stated here https://code.google.com/archive/p/shedskin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With