I'm trying to execute a python code with command line argument using VBA. My python file name is test.py. While I'm executing following command using command prompt
python test.py Sales
Then my python code process sales data & store the processed output in a table in SQL server.I can able to see the uploaded data in SQL server. I would like to execute this python script using VBA. So I wrote following code
Sub executePython1()
Dim wsh As Object
Set wsh = CreateObject("WScript.Shell")
arg = "Sales"
Dim shell_exec As Object
Set shell_exec = wsh.Exec("""python.exe""" &
"""C:\x1\test.py """ & arg)
MsgBox "Executed"
End Sub
After running the code I'm seeing "Executed" message but I'm unable to see any data in my SQL Server table. Can you help me to resolve this issue?
I'm working on Windows azure & running python 3.7