feat(sheets): formatting commands#320
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 9, 2026
Merged
Conversation
0d87afa to
b016280
Compare
Collaborator
|
Landed via reviewed rebase onto main.
|
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 7 new
sheetssubcommands covering formatting and layoutoperations:
MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS)
CURRENCY, PERCENT, DATE, TIME, DATE_TIME, SCIENTIFIC, TEXT) with
optional custom patterns
--sheetselector defaulting to the first sheet
auto-fit to content (both support
--auto)rules (NUMBER_GREATER, TEXT_CONTAINS, BLANK, etc.) with
--bg-color,--text-color, and--boldstylingAlso includes a fix for the build-breaking type grouping bug in
contacts_crud.go(duplicates #287, needed to compile).Details
BatchUpdatewith the appropriate requesttypes (MergeCells, RepeatCell, UpdateSheetProperties,
UpdateDimensionProperties, AutoResizeDimensions,
AddConditionalFormatRule)
sheets_format.go: inputvalidation,
normalizeGoogleID,cleanRange,parseSheetRangegridRangeFromMapfor range resolution,dryRunExit, JSONoutput via
outfmtresolveSheetIDByNameOrFirstis a new shared helper used byfreeze and resize commands for sheet resolution without
requiring a full A1 range
parseSheetsColorsupports both#RRGGBBandr,g,b(0-255integer) inputs
parseColumnsSpan/parseRowsSpanhandle dimension-only A1ranges (e.g.
Sheet1!A:C,Sheet1!1:10)ForceSendFieldsto ensure zero values (unfreeze)are serialized correctly
Test plan
make testpasses (5 new test files with httptest mockservers)
make fmtclean (gofumpt + goimports)make lintclean for all new files (remaining warningsare pre-existing in contacts/sheets_insert)
verified)
New files