Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling python code from VSTO excel addin

I am working on an excel2007 plugin in VSTO and am using VB for coding it. One of the item in the plugin is the button, pressing which should give a call to a python program which will add some data to the current worksheet. I would like to know 1 How can i call the python function from the VBA code 2 pass the active workbook to this code?

like image 670
crystal Avatar asked Jul 31 '26 10:07

crystal


1 Answers

you can use PyXLL to call a python function from Excel either as a worksheet function or as a macro which you can call from VBA. If you look at the docs for xl_macro on the PyXLL website you'll find an example of how to do that.

like image 90
Tony Roberts Avatar answered Aug 01 '26 22:08

Tony Roberts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!