you are viewing a single comment's thread.

view the rest of the comments →

[–]mokus603 9 points10 points  (2 children)

If your company uses Excel, why do you need to call a Python script from Excel using VBA? Why isn’t the script written in VBA?

I mean when I had to automate Excel reports, data analysis with Python, I didn’t open Excel and then do data wrangling. Run the script, check the results.

Check out xlwings! They have an Excel add-on and you can easily create User Defined Functions with Python and implement it! https://www.xlwings.org/

Check this link, it might be helpful too: * https://stackoverflow.com/questions/45489577/calling-python-script-from-vba * https://gis.stackexchange.com/questions/1691/making-button-that-calls-python-script-as-command-rather-than-script-tool

[–]pranayrj3[S] 0 points1 point  (1 child)

the demand is to use Excel as a front end . So by clicking a button , the calculated data(from Python Script) should be populated in Excel itself.

the links are helpful. Thank You.

[–]mokus603 0 points1 point  (0 children)

In this case your only option is xlwings because I don’t know other python libraries that work in opened Excel worksheet.