Skip to main content
The Google Sheets resource exposes Sheets spreadsheets as a virtual filesystem mounted at some prefix such as /gsheets/. For Google OAuth setup, see Google Workspace Setup.

Config

Filesystem Layout

Example:
Spreadsheets are split into owned (spreadsheets you created) and shared (spreadsheets shared with you). The filename shape is:
If the modified date is unavailable, the date prefix is omitted. Reading a spreadsheet file returns the full Google Sheets API JSON for that spreadsheet, including sheet metadata.

Shared Drives

The listing covers every corpus the account can reach, so a spreadsheet that lives in a Shared Drive appears here too. A Shared Drive spreadsheet has no owner (the drive owns it), so it lands under shared, which is what that directory means. This matches the gdrive mount, where Shared Drives are top-level directories: without it the same account would see a spreadsheet under one Google mount and not the other, with no error explaining the difference. Drive answers an all-corpora search best-effort. When it reports that it skipped a corpus, the short listing is still returned but is not cached as the directory, so the next ls re-lists instead of serving the gap until the cache expires.

Cache

The Google Sheets resource uses IndexCacheStore. Index entries store spreadsheet IDs and metadata. There is no separate content cache — file content caching is handled by the workspace IOResult mechanism.

Example

See examples/gsheets/gsheets.py for the full working example.

Shell Commands

Standard commands available on the mounted Google Sheets tree: Acting on spreadsheets (read/write/append ranges, raw API calls) goes through the gws CLI when installed.