In this video, I'll show you how to run a python code using Excel VBA.
The VBA code below is not mine. I found it in dozens and dozens of google searches and it's the same code. Remember to change the two variables inside the """ """"
#Python #ExcelVBA
Follow me on Twitter and Github @bjone6.
====================================
Sub RunPythonScript()
Dim objShell As Object
Dim PythonExePath As String, PythonScriptPath As String
ActiveWorkbook.Save
ChDir ActiveWorkbook.Path
Set objShell = VBA.CreateObject("Wscript.Shell")
PythonExePath = """ """
PythonScriptPath = """ """
objShell.Run PythonExePath & PythonScriptPath
End Sub
Смотрите видео Run Python Code with Excel VBA | онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Brandon Jacobson (Jacobson Enterprises) 21 Сентябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 15,083 раз и оно понравилось 139 людям.