作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将电子邮件地址作为超链接插入到 google 工作表单元格中,这样只会出现“电子邮件”一词,而不是整个电子邮件地址,这里是我想做的示例 a cell that contain a hyperlink which is actually an email address
这是我最后一次尝试的代码
import hyperlink
from oauth2client.service_account import ServiceAccountCredentials
from pprint import pprint
scope = ["https://spreadsheets.google.com/feeds", 'https://www.googleapis.com/auth/spreadsheets',
"https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive"]
creds = ServiceAccountCredentials.from_json_keyfile_name("creds.json", scope)
client = gspread.authorize(creds)
sheet = client.open("influenceurs_35k-55k(08.07.20)").sheet1
data = sheet.get_all_records()
col = sheet.col_values(2)
insertRow = ["hello", 5, "red", "blue"]
sheet.delete_rows(14)
sheet.insert_row(insertRow, 14)
sheet.update_cell(14,1, "seyepapeseny@gmail.com".format("email"))
sheet.format("A14:b14")
“seyepapeseny@gmail.com”是我想用 gspread 作为超链接插入的电子邮件
最佳答案
我发现可以使用 google 表格公式
sheet.update_acell('A14','=HYPERLINK("seyepapeseny@gmail.com","email")')
关于python - 如何使用 gspread 在 google 工作表单元格中插入任何超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62835511/
我是一名优秀的程序员,十分优秀!