-
Notifications
You must be signed in to change notification settings - Fork 517
excel sheet
zmworm edited this page May 1, 2026
·
54 revisions
Worksheet management.
Path: /{SheetName} (e.g., /Sheet1, /Sales Data)
officecli get data.xlsx /Sheet1
officecli get data.xlsx /Sheet1 --depth 2| Property | Accepted Values | Description |
|---|---|---|
freeze |
cell ref (e.g., A2, B3) or none/false
|
Freeze panes |
zoom / zoomscale
|
10-400 | Zoom scale percentage |
tabColor / tab_color
|
hex RGB, scheme name, or none
|
Sheet tab color. Scheme color names: accent1–accent6, lt1, dk1, lt2, dk2, bg1, bg2, tx1, tx2, hlink, folHlink (writes theme-indexed TabColor@theme; query readback echoes the symbolic name). |
name |
new sheet name | Rename sheet — also cascades into named-range references, formulas, internal hyperlinks, sparkline data refs, validation list refs, and CF formulas across all sheets. Duplicate names rejected. |
visibility |
visible / hidden / veryHidden
|
Three-state visibility. veryHidden is only toggleable via VBA in Excel itself; query distinguishes the three states. hidden=true is a convenience alias for visibility=hidden. |
margin.top / margin.bottom / margin.left / margin.right / margin.header / margin.footer
|
inches (decimal) | Print margin. Get returns the same keys. |
fittopage |
bool | Fit-to-page printing. false/none clears the flag and width/height overrides. |
sort |
sort spec | Sort rows — see Sort for full syntax, examples, and rejection rules |
sortHeader |
false |
Treat the first row as a header (excluded from reorder). Used with sort. |
direction / dir / rtl / rightToLeft / sheet.direction
|
rtl/ltr or bool |
Toggle the <x:sheetView rightToLeft="1"/> flag — used by Arabic/Hebrew layouts. Get returns canonical direction=rtl (matches Word/PPT). direction=ltr clears the attribute on default-LTR sheets. |
printTitleRows |
range (e.g. 1:1, $1:$2, Sheet1!$1:$1) |
Repeat-on-print row range. Merged with printTitleCols into a single _xlnm.Print_Titles definedName per sheet. |
printTitleCols |
range (e.g. A:A, $A:$B) |
Repeat-on-print column range. |
officecli set data.xlsx /Sheet1 --prop freeze=A2
officecli set data.xlsx /Sheet1 --prop freeze=B2
officecli set data.xlsx /Sheet1 --prop freeze=none
officecli set data.xlsx /Sheet1 --prop zoom=150
officecli set data.xlsx /Sheet1 --prop tabColor=FF0000
officecli set data.xlsx /Sheet1 --prop tabColor=none
officecli set data.xlsx /Sheet1 --prop name=Revenue
# Sort — see excel-sort for full docs
officecli set data.xlsx /Sheet1 --prop sort="A asc, D desc" --prop sortHeader=trueofficecli remove data.xlsx /Sheet2Based on OfficeCLI v1.0.66