简体   繁体   English

按下按钮是否可以从Google表格运行python脚本?

[英]Is it possible to run a python script from google sheets on a button press?

I have a script that reads from a google sheet and uses the information to create tickets using the Jira python api. 我有一个脚本,该脚本从Google工作表中读取并使用该信息通过Jira python API创建票证。 In my situation it won't work to have the script be triggered at a certain time, the script has to be triggered through the sheet. 在我的情况下,在特定时间触发脚本是行不通的,必须通过工作表触发脚本。 Is there some way to detect a button press or a cell change which runs my local python file? 有什么方法可以检测运行我的本地python文件的按钮按下或单元格更改吗?

I had a similar problem. 我有一个类似的问题。 there is a tool set call 'gspread', which can read from python data from your Google sheets. 有一个名为“ gspread”的工具集,可以从您的Google表格中读取python数据。 What I did is a script in the spread sheet, what filled a cell with "Start + time". 我所做的是电子表格中的脚本,该脚本用“开始+时间”填充了一个单元格。 You can trigger script with this with a button. 您可以通过按钮触发脚本。

Now the python program read this cell every minute. 现在,python程序每分钟读取一次此单元格。 If the cell contains the start trigger, if fires the python script. 如果单元格包含启动触发器,则触发python脚本。

Not the nicest solution, but it works for a few years now. 这不是最好的解决方案,但是它已经运行了几年。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 按下按钮从谷歌表运行保存在本地机器中的 python 脚本 - Running a python script saved in local machine from google sheets on a button press 从google工作表中执行python脚本 - Execute python script from within google sheets 如何从VB按下按钮时将参数传递给python脚本 - How to pass arguments to a python script on a button press from vb 从 Google Sheets 电子表格调用 python 脚本的好方法是什么? - What is a good way to call a python script from a Google Sheets spreadsheet? 按下 Flutter 中的按钮时,是否可以从 a.js 或 .py 文件运行 js 或 python 脚本? (不是 Flutter 网页版) - Is it possible to run a js or python script from a .js or .py file when a button in Flutter is pressed? (Not Flutter Web) 将Python脚本转换为Google表格脚本 - Convert Python Script to Google Sheets Script 从html按钮提交运行python脚本 - Run python script from html button submit 是否可以在 Apache 光束或谷歌云数据流中运行自定义 python 脚本 - Is it possible to run a custom python script in Apache beam or google cloud dataflow python 脚本是否可以在写入该行之前检查谷歌表格中是否存在该行? - Is it possible for a python script to check whether row exists in google sheets before writing that row? 从 tkinter 上的按钮按下启动另一个脚本 - Starting another script from button press on tkinter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM