So I'm trying to have a button in my Excel spreadsheet launch a Python script. Apparently this is only possible on Windows, so on the Mac version people have a workaround where they use Excel to launch an AppleScript which then launches a Python script.
In Automator I've tried selecting Application, and when that didn't work I selected Quick Action, and both times I inserted a 'Run Shell Script' module.
Within that I set the Shell to 'usr/bin/python' and Pass input as 'As Arguments'. Then in the text field I put
do shell script "/Users/user_name/Desktop/integrationtest.py"
and I tried
do shell script "python /Users/user_name/Desktop/integrationtest.py"
When I click Run in the top right of Automator it says
The action “Run Shell Script” encountered an error: “ File "<string>", line 1
do shell script "/Users/user_name/Desktop/integrationtest.py"
^
SyntaxError: invalid syntax”
File "<string>", line 1
do shell script "/Users/user_name/Desktop/integrationtest.py"
^
SyntaxError: invalid syntax
Not too sure what I'm doing wrong - any ideas? Thanks for any help
do shell scriptin AppleScript. I'm not really up on Excel buttons, though, so I'll have to look into that later.