0

I bought some API for VBA Excel/reference. Is is possible to use this API in Python 2.x ? Maybe the question could be is there possible to import VBA reference into Python. This is just the idea. Do not have a any clue if this is even possible ? If it is not possible, is there some nice solution ? Do you have some some experience ? Thanks

Matus Uhrin
  • 73
  • 1
  • 4
  • Can you provide more information on what you are trying to achieve? Specifically what API you are trying to access? Here is an [example](http://stackoverflow.com/questions/14732340/how-to-call-excel-vba-functions-and-subs-using-python-win32com) on how you can call VBA functions using python. – Jan Trienes May 12 '17 at 07:12
  • Thanks for the hint. This seems is the way how to run the sub/function written in VBA and running the sub from excel. I do not want to use excel at all. Your solution is not bad just I need excel to make it run. I would like to use API written for VBA for some actuarial software. The API has the function to read the results from the actuarial software and I would like to use this function in python without running VBA. Not sure if this is be possible. – Matus Uhrin May 12 '17 at 08:42

2 Answers2

0

I think basically you want to translate the VBA to python.

If you can take a look at how the API was constructed then it is possible but you have to translate the code by yourself.

If you can not, then you could build python scripts for your own, base on the logic you figure out, and you have to know about actuarial software you mentioned, if they have API to extract data, or any other means so you can get the data to process (this is possible since the API in VBA could do that)

I have experienced in finance banking, VBA and python in working with finance data, and I'm somewhat familiar with API for accounting software, so if you want you can contact me to discuss so I can help. I think wrap this up in an answer is impossible.

Phung Duy Phong
  • 876
  • 6
  • 18
  • The software has licence so I do not have the access to it. To replicate it in python will be not possible I think. – Matus Uhrin May 12 '17 at 10:41
0

I know that this is from years ago, but I just stumbled across it and thought I would share my 2 cents.

One possibility is to translate it into VBScript - this is very similiar to VBA, and does not require Excel, etc in order to run. It would, of course, depend on what was in the original function.