Skip to main content

Module sheets

Module sheets 

Source
Expand description

Google Sheets API (v4) integration — reading and writing spreadsheet cells, which the Drive API structurally cannot do (issue #1589, ADR-0073).

Drive treats a Sheet as an opaque native document: files.export renders it to a foreign format and a media files.update replaces the whole document by re-importing one. There is no Drive-level notion of a range, a row or a cell, which is why ADR-0069 can only export the first sheet as CSV and why ADR-0071 §9 has drive edit refuse Google-native documents outright.

Lives under src/drive/ rather than a top-level src/sheets/ for two reasons, one of them load-bearing: it shares the account store, DriveCredentials, token refresh and the drive commit scope; and FilesApi’s mutating methods are pub(in crate::drive) — the visibility fence that makes “no gate bypass” true by construction rather than by convention. A sibling top-level module could not call them without widening that fence.

Modules§

a1
A1-notation helpers for the Sheets API (issue #1589).
api
Sheets v4 API façade — typed wrappers over the handful of endpoints the CLI needs, mirroring crate::drive::files_api::FilesApi’s shape.
auto_fill
auto-fill — extends a series from source cells into an adjacent destination via spreadsheets.batchUpdate’s autoFill request (issue #1840, ADR-0083).
banding
Banded ranges — alternating row/column colors — via spreadsheets.batchUpdate (issue #1832, ADR-0082).
cell_format
drive sheets read-cell-format engine — reports a range’s per-cell userEnteredFormat, note and data-validation rule (issue #1878).
client
Sheets v4 REST API client.
conditional_format
Conditional formatting via spreadsheets.batchUpdate (issue #1793, ADR-0081 §1).
create
drive sheets create engine — creates a spreadsheet and optionally seeds its cells (issue #1589, ADR-0073 §11).
date_value
Sheets’ relative-date keywords, the date-condition operand shape they feed into, and the condition-value validators both callers’ validate_* functions need.
delete_duplicates
delete-duplicates — remove rows within a range that duplicate an earlier row (issue #1844).
developer_metadata
Developer metadata (issue #1795, ADR-0081 §4).
dimension_group
Dimension groups — row/column outlining, the collapsible +/- grouping bar — via spreadsheets.batchUpdate (issue #1833, ADR-0084).
embedded_object
Charts and slicers via spreadsheets.batchUpdate (issue #1797, ADR-0081 §3).
filter
The basic filter and filter views via spreadsheets.batchUpdate (issue #1794, ADR-0081).
find_replace
Find and replace cell text through spreadsheets.batchUpdate (issue #1841).
format
Cell/border formatting, merging and auto-resize via spreadsheets.batchUpdate (issue #1643, ADR-0077).
named_range
Named ranges via spreadsheets.batchUpdate (issue #1796, ADR-0081 §2).
paste
Clipboard-style range operations — cutPaste, copyPaste and pasteData — via spreadsheets.batchUpdate (issue #1839, ADR-0083 §4).
pivot
Pivot tables via spreadsheets.batchUpdate’s updateCells request (issue #1798, ADR-0081 §5).
protection
Protected ranges via spreadsheets.batchUpdate (issue #1643, ADR-0077).
randomize_range
randomize-range — shuffles the row order within a bounded range into an unpredictable, server-chosen order (issue #1845).
read
drive sheets read engine — cell values for one range, or for every sheet in a workbook.
sort_range
sort-range — reorder rows in a caller-named range (issue #1842).
structure
Structural and destructive spreadsheet edits via spreadsheets.batchUpdate.
text_to_columns
text-to-columns — splits a single column’s delimited text into the adjacent columns to its right via spreadsheets.batchUpdate’s textToColumns request.
trim_whitespace
trim-whitespace — trim whitespace in every cell of a range (issue #1844).
types
Wire types for the Sheets v4 REST API.
validation
Data validation via spreadsheets.batchUpdate (issue #1643, ADR-0077).
write
drive sheets write/append/clear engines — cell mutation gated by the ADR-0071 folder write-permission rules (issue #1589, ADR-0073).