我试图在VBA中的.py
文件中调用python函数。
我使用此命令打开python shell:
Pathctrl = "C:\users\test\Desktop"
ChDir Pathctrl
Call Shell(Pathctrl & "\anaconda_python.bat ", vbNormalFocus)
我不知道如何编写VBA命令来运行python shell中的特定函数。
答案 0 :(得分:2)
这是一个VBA问题(与Python无关)。
根据@Ripster的说法,在Execute a command in command prompt using excel VBA中,您可以使用Call Shell(...)
调用脚本。