cristoper / gsheet

gsheet is a CLI tool (and Golang package) for piping csv data to and from Google Sheets
MIT License
83 stars 5 forks source link

Append to sheet #6

Closed DLakin01 closed 11 months ago

DLakin01 commented 1 year ago

Is it possible to add an option to append CSV data to an existing sheet, rather than overwriting? This would make the tool much more usable. Thanks!

cristoper commented 11 months ago

Thanks for the suggestion @DLakin01, I have finally implemented a simple --append option to the csv command. You should now be able to pipe data to be appended to the end of a sheet with:

$ cat data.csv | gsheet --id SHEETS_DOC_ID --range Sheet1 --append

You can also give a specific range and the input data will be appended to the end of any contiguous data (what Google calls a "table") in that range.

If you have a chance to try it out, let me know if it works for your use case.