Python 3.x 如何使用gspread、python删除完整的电子表格

Python 3.x 如何使用gspread、python删除完整的电子表格,python-3.x,google-sheets-api,gspread,Python 3.x,Google Sheets Api,Gspread,这是我的代码,用于记录没有参加google meet会议的朋友的出席情况 我们使用组织电子邮件,所以每个人都有自己的姓名作为登记号码 使用会议出勤在电子表格中记录分机登记号码(在场人员) import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ["https://spreadsheets.google.com/feeds", "https://www.g

这是我的代码,用于记录没有参加google meet会议的朋友的出席情况

我们使用组织电子邮件,所以每个人都有自己的姓名作为登记号码

使用会议出勤在电子表格中记录分机登记号码(在场人员)

import gspread
from oauth2client.service_account import ServiceAccountCredentials

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('Client_secret.json', scope)

client = gspread.authorize(creds)

url = "Url of my SpreadSheet"
sheet = client.open_by_url(url).sheet1

# 66
try:
    cell = sheet.find('566')
    pass
except gspread.exceptions.CellNotFound:
    print('566 Absent')


# 67
try:
    cell = sheet.find('567')
    pass
except gspread.exceptions.CellNotFound:
    print("567 Absent")

# 68, etc...

# ----------------------------------------------------
# Code to delete the spreadsheet once the work is done.
# ----------------------------------------------------
我负责将缺席人员的登记号码交给经理


我正在尝试保存我的存储我不能一直手动删除电子表格,这就是为什么我需要一个代码来使用
gspread

删除完整的电子表格。您可以使用方法删除电子表格