0

If I have a python script, for example:

def hello():
    return 'Hello World'

How can I call this python script in Google App Script? Or how can I create a custom function for spreadsheet which return this python function? Something like:

function callPythonFunction() {
  const result = //hello function from python script
  return result; // 'Hello World' from hello()
}

And if I use this in spreadsheet:

=callPythonFunction()

I get 'Hello World' in the cell.

1

1 Answer 1

1

I think there is no another way other than running the python app in a 3rd party service and then call it from GAS using UrlFetch() (I've seen someone do this but not tried it entirely), or using Google's API in python or gspread if you want to have access onto spreadsheets.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.