I want to call a python script from Excel via VBA or a hyperlink. But MacOS Ventura doesn

I'm trying to automate some tasks on Excel by calling Python. At windows I can call python via VBA or hyperlinks. But, at MacOS I can't. I use a MacBook pro 2019 and MacOS Ventura.

I used a hyper link to a python file but I got an error saying, "Microsoft Excel is not allowed to open documents in Terminal." I tried to call a python script and a .sh file. In both cases I got the same error.

Here is an example file I try to run.

#!/Users/akifarslan/Desktop/coding/field_payroll2/venv/bin/python3.11

import time

# print current time and sleep for 10 seconds

print(time.ctime())
time.Sleep(10)

Does anybody know how to make MacOS Ventura to let Excel run files on terminal?

MacBook Pro 15″, macOS 13.0

Posted on Dec 15, 2022 4:37 PM

Reply

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I want to call a python script from Excel via VBA or a hyperlink. But MacOS Ventura doesn

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.