خرید بک لینک

Vote count: 0

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?

asked 4 mins ago

1 Answer

Vote count: 0

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.

answered 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 1 تير 1395 ساعت: 22:07

صفحه بندی