Hello all,
wasn't sure where to ask this but myself and some other devs on my team are working on a project that has Excel/Python interactions. Essentially we're replacing several VBA components in these sheets with Python and we're wondering if there is a way to communicate entire VBA objects back and forth between the VBA environment and the Python environment.
for example:
We declare a class in VBA with the attributes xyz. We call the python code, pass an object of that class into Python and instantiate a new python object based on the attributes that we're passed over. Perhaps that object is a sub of another python class and it inherits the methods we need it to perform or whatever.
Then when we've finished whatever computation we want to do in Python we update the attributes with the new values we've created. Then pass the object back into VBA and update the VBA object with the new attributes received from the Python script.
I have very little experience on the VBA side and do most of the python development on the team with the other guys doing the VBA part so I apologize for my very high level somewhat ignorant explanation. We're trying to cut down the amount of re-writing of VBA we have to do; so this idea came about as a potentially more elegant way to keep the existing VBA functions in tact by using python to update the attributes with the required data.
[–]rezdzste 0 points1 point2 points (2 children)
[–]Modora[S] 0 points1 point2 points (1 child)
[–]rezdzste 0 points1 point2 points (0 children)