Reputation: 23
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.
Upvotes: 0
Views: 87
Reputation: 11214
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.
Upvotes: 1