Insert/update CSV file into Google Spreadsheets using Python and v4 Spreadsheets API
$10-30 AUD
已取消
已发布超过 6 年前
$10-30 AUD
货到付款
I have a need to upload/insert and update a CSV file into a designated Google Spreadsheet.
Python script must take input of CSV name on filesystem (Mac), year and month for processing on the command line. The specific Google Spreadsheet ID can be stored as a parameter in the script (i.e. will remain static). Version 4 of the sheets API must be used, and the upload of data should not interfere with existing formulas in the sheet.
As per screenshot of the spreadsheet (access will be provided on successful assignment), the year and month are used to define which tab of the spreadsheet the data must be inserted/updated into.
The CSV will always represent the full month of data, so overwriting the cells is permitted (rather than having to figure out what data was stored there previously).
Example CSV is attached, as is screenshot of the current Google Spreadsheet.
Script should gracefully error out if it cannot connect/hits API limits in Google. I will also need sufficient comments in the script to enable me to add additional columns at a later date as well.
Additional context if required:
Data is being exported out of Toggl and output into the CSV, I have coded that bit in Perl (because I know the language well) the Google Spreadsheets API is the bit giving me a headache, hence why we are here. Therefore the input can be changed if required such as adding a header row, open to other options as well.
The end goal is to run the perl script daily to get a new CSV dump from Toggl, then push overwrite the existing rows in the timesheet tab for the month in question.