UPLOAD-TO-SHEETS(1) | User Commands | UPLOAD-TO-SHEETS(1) |
upload-to-sheets - publish CSV files to Google Spreadsheet
usage: upload-to-sheets [-h] [--docid DOCID] [--title DOCTITLE] [--verbose]
Publish a CSV file to a Google Spreadsheet sheet.
This is a convenient script to update an existing Google Spreadsheet document with the contents of a CSV file.
NOTE: This script replaces and obsoletes 'upload-csv-to-google-sheet'.
For example, this invocation creates a new Google Sheet doc and upload the contents of the CSV files to sheets named 'apples' and 'oranges':
You can override the name of the sheets created by appending a colon and the name, like this:
If you'd like to upload the sheets in an existing document, provide it as an option:
Note that if you do this and there are existing sheets with the same names, e.g. "apples", the contents of these sheets will be replaced by the uploaded contents. All the other sheets will remain untouched. This is designed so that you can manually craft a custom spreadsheet and upload only some of it sheets with contents derived from another program (e.g. Beancount).
This script only requires the latest and official Google client API libraries (it does not need gdata nor Python wrappers for sheets). It uses the v4 Sheets API (current as of 2013-2017-12-15). You will need to have an installation of the following libraries for this to work:
Moreover, you will need to enable the Google Sheets API in the developer console and download the Client Secrets that Google provides to ~/.google-apis.json. (You can override this location with the GOOGLE_APIS environment variable.)
November 2022 | upload-to-sheets 2.3.5 |