Answer the question
In order to leave comments, you need to log in
How to get Notes from Google Sheet using Python?
I get cell values like this:
import httplib2
import apiclient.discovery
from oauth2client.service_account import ServiceAccountCredentials
CREDENTIALS_FILE = 'credentials.json'
credentials = ServiceAccountCredentials.from_json_keyfile_name(CREDENTIALS_FILE, ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive'])
httpAuth = credentials.authorize(httplib2.Http())
SHEETS = apiclient.discovery.build('sheets', 'v4', http = httpAuth)
SHEET_ID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
result = SHEETS.spreadsheets().values().batchGet(spreadsheetId=SHEET_ID, ranges='Sheet1!A:F').execute()
print result
Answer the question
In order to leave comments, you need to log in
from googleapiclient.discovery import build
service = build('sheets', 'v4')
response = service.spreadsheets().get(spreadsheetId = spreadsheetId,
fields = 'sheets(data.rowData.values.note)').execute()
print(response)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question