-
Notifications
You must be signed in to change notification settings - Fork 599
excel row
goworm edited this page Jun 26, 2026
·
1 revision
Address a worksheet row to set its height, hide it, group it into an outline, or query rows by a column predicate.
Path: /{SheetName}/row[N] (N is 1-based)
- add - Insert a row, optionally seeding empty cells or cloning from another row
- set - Change row height, visibility, or outline grouping
- get - Read a row's attributes
- query - Filter rows by a column predicate (e.g.
row[Salary>5000]) - remove - Delete a row
Parent: /{SheetName}
| Property | Default | Description |
|---|---|---|
cols |
Number of empty cells to seed in the new row | |
height |
Row height in points | |
hidden |
false |
Hide the row |
add --from /{SheetName}/row[K] with --before/--after clones cells + single-row mergeCells; relative formula refs are delta-shifted to the new anchor (Excel "Insert Copied Cells" parity). Inserting at an occupied slot shifts every row at or past the slot down by one, and every range-bearing structure on the sheet (mergeCells, CF/DV sqref, autoFilter, hyperlink/table refs, named ranges, formula cell-refs) follows the displacement.
Path: /{SheetName}/row[N]
| Property | Description |
|---|---|
height |
Row height in points |
hidden |
Hide/show the row |
outline |
Outline/group level 0-7. Aliases: outlineLevel, group. Get readback uses canonical key outlineLevel
|
collapsed |
Collapse the row group (set-only) |
All formatting props are currently Set-only (Add/Set asymmetry).
| Attribute | Type | Description |
|---|---|---|
height |
number | Row height in points (raw double as stored) |
hidden |
bool |
true when hidden, key absent otherwise |
outlineLevel |
number | Outline grouping level (0 = ungrouped, 1..7 = nested depth). Get-only readback of the value set via outline; key omitted when the row has no outline level |
customHeight |
bool |
true when the row carries an explicit height (Row @customHeight) |
matchedTable |
string | Label of the table whose column predicate this row matched (emitted on row nodes returned by a row[Col op val] selector). Get-only |
tableSource |
string |
detected when matchedTable came from a header-sniffed (not real listObject) table. Get-only |
# Set row height and hide a row
officecli set data.xlsx /Sheet1/row[2] --prop height=24
officecli set data.xlsx /Sheet1/row[5] --prop hidden=true
# Group rows into an outline level, then collapse
officecli set data.xlsx /Sheet1/row[3] --prop outline=1
officecli set data.xlsx /Sheet1/row[3] --prop collapsed=true
# Insert a new row seeded with 5 empty cells
officecli add data.xlsx /Sheet1 --type row --prop cols=5
# Clone a row's cells and formatting below the original
officecli add data.xlsx /Sheet1/row[2] --from /Sheet1/row[2] --after
# Read a row's attributes
officecli get data.xlsx /Sheet1/row[2]
# Filter rows by a column predicate (resolves against a ListObject or a detected header-row table)
officecli query data.xlsx "row[Salary>5000]"
officecli query data.xlsx "row[Region=West and Sales>1000]"
officecli query data.xlsx "row[Status=open or Priority=high]"
# Remove a row
officecli remove data.xlsx /Sheet1/row[5]- Sheet - The parent worksheet
- Cell - Individual cells within a row
- Row Break - Manual horizontal page breaks
- Excel Reference - All Excel elements
Based on OfficeCLI v1.0.119