简体   繁体   中英

Get filtered data from Google Sheets API with python?

didn't found an answer. Is it possible to use Python Google sheets API eg service.spreadsheets().get() to get data from spreadsheet only matching some criteria. For example from this spreadsheet

I want to get names with timestamp older than 5/3/2020 12:00:00. Is it possible to get, or I need to retrieve all data and filter with script?

Thanks, and sorry for screenshot outside of topic.

Unfortunately it's not possible to retrieve a filtered range using the Sheets API in python.

Either you apply a filter to the entire range directly in your code or you can use Google Visualization API. Here you can find a guide on how to use the Google Visualization API with the Spreadsheet. Note that you will have to make your google sheet public in this case.

Reference

Google visualization API

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM