cristoper / gsheet

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

Implement sheetInfo and title commands #9

Closed cristoper closed 6 months ago

cristoper commented 6 months ago

These two commands make it possible to look up the title of a sheet (one of the tabs of a Spreadsheet document) if you know its sheet id (which can be found in the URL as its "gid"; the first sheet created always has a gid of 0).

The first is the title command which translates the given sheetid to its title. Example:

gsheet title --id 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms --sheetid 0 returns Class Data

The other is the sheetInfo command which dumps a Spreadsheet documents metadata including its sheets (in the "sheets" property:

gsheet sheetInfo 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms