从团队合作中获取Google电子表格数据

时间:2019-03-26 09:16:42

标签: google-drive-api

我正在设置一个脚本,该脚本定期从电子表格中检索数据。但是,我当前使用的google-shee-api不支持团队合作。

我已经专门针对python尝试过此文档:

https://developers.google.com/sheets/api/quickstart/python

from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request

service = build('sheets', 'v4', credentials=creds)

    # Call the Sheets API
    sheet = service.spreadsheets()
    result = sheet.values().get(spreadsheetId=SAMPLE_SPREADSHEET_ID,
                                range=range_value).execute()

我需要从存储在Google Team Drive中的电子表格中获取数据。具有google-sheet-api的相同功能

0 个答案:

没有答案