ktv6

VBA Python Call

Sep 11th, 2020 (edited)
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Sub Test()
  2. Dim pythonEmbeddedPath, scriptPath As String
  3. pythonEmbeddedPath = ThisWorkbook.Path & "\python-3.8.5-embed-win32\" & "python.exe"
  4. scriptPath = ThisWorkbook.Path & "\Analysis-R1.py"
  5. Call Shell(pythonEmbeddedPath & " " & scriptPath)
  6. End Sub
Add Comment
Please, Sign In to add comment