Not sure if this is an obvious answer. I have a complete sheet with thousands of rows. What I need is for a new google sheet to update rows daily from the original sheet. For example
Any help is appreciated.
I believe the question would be the method to interact with Google Sheet with eg Python.
1) Install 2 packages:
python3 -m pip install --user gspread oauth2client
2) Google Drive API (Google Cloud Platform)
Credentials for Google Drive API:
3. Google Sheets API (Google Cloud Platform)
Google Sheets API > Enable
4. gspread package
Get Methods:
get_all_records()
row_values(row)
col_values(col)
cell(row, col).value
Insert Methods:
insert_row(array, rowNo)
delete_row(rowNo)
update_cell(rowNo, colNo, value)
I shall leave out the details of reading your local spreadsheet as details were not provided. To do this periodically, I suggest you consider running your Python script periodically with Windows Task Scheduler .
Reference: https://gspread.readthedocs.io/en/latest/
ps I used to struggle with this while creating a chatbot for a school project, so the following was what I had done previously.
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.