June 29th, 2014, 11:03 am
Hello, I don't have experience of gluing together Python and VBA but I do have experience gluing Python and C++, Python and Fortran, and I have used things like py2exe and cxfreeze in the past for various things. In general doing this kind of thing has not been very fun, it is a lot of fiddling around and you reach the 'rough edges' of the Python ecosystem where problems are plentiful and answers are scarce.If I understand your predicament correctly, one approach might be to run a web server with a Rest API on your server machine, which the VBA client communicates with using http requests. Then your VBA code is receiving data in the clean representation wrapped by your lightweight ORM. In other words, you make a 'webapp'. This is actually pretty easy to do with well supported Python web frameworks such as Flask, Tornado and Django (listed roughly in order of ease of use) or if you prefer it is fairly easy to roll your own with the Python standard library. But this additional layer might complicate things, and of course it would introduce other (different) problems.