I have tried several solutions to run python script out of VBA.
My current solution that still doesnt work
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim windowStyle As Integer: windowStyle = 1
Dim waitOnRetu As Boolean: waitOnRetu = True
wsh.Run "C:Python33python.exe C:Users***DocumentsPromo modelsget_sku_data.py", windowStyle, waitOnRetu
Any ideas?
xlwings claims to make python from excel very easy:
Sub RandomNumbers()
RunPython ("import mymodule; mymodule.rand_numbers()")
End Sub
To make this run, just import the VBA module xlwings.bas in the VBA editor (Open the VBA editor with Alt-F11, then go to File > Import File... and import the xlwings.bas file. ). It can be found in the directory of your xlwings installation.
برچسب:
نویسنده: استخدام کار
تاريخ: سه
شنبه
1 تير
1395 ساعت: 22:07