What would be the best way to use python's functions from excel?

Tags: python excel
By : Rook
Source: Stackoverflow.com

Somebody really needs to fix this "subjective questions evaluator"

I usually compile my functions in a DLL and call them from excel. That works fine (well, let's just say it works)

Unfortunatelly, python cannot be compiled. I know of py2exe but I don't know that it can make a DLL.

So, ..., is there any other way ? I appreciate all ideas and suggestions on the matter.

By : Rook


I don't know any py2dll similar to py2exe.

However, you could create a dll in C and use the Very High Level Layer to call your script. I don't know it is an acceptable solution for you. Just an idea.

By : luc

I had to do this some years back. My solution was to run small Python server that exported the functions using SOAP, then call the functions using Visual Basic's SOAP library. The advantage is that you don't have to ship a Python environment with your spreadsheets. The disadvantage is that the clients will need a network connection.

By : Joe

There is an Excel Addin that allows you to do this called Discovery Script at xefion.com.

It's free but not open source. It's also based on the IronPython implementation.

This video can help you solving your question :)
By: admin