Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement sheetInfo and title commands #9

Merged
merged 4 commits into from
May 14, 2024
Merged

Implement sheetInfo and title commands #9

merged 4 commits into from
May 14, 2024

Conversation

cristoper
Copy link
Owner

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

cristoper added 4 commits May 1, 2024 21:36
This gets info about a spreadsheet by ID and outputs it as JSON.
This command will return the title of a sheet given its id, ex:

gsheet title --id $GSHEET_ID --sheetid 1677410885
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant