-
Notifications
You must be signed in to change notification settings - Fork 542
excel cell set
zmworm edited this page Mar 18, 2026
·
51 revisions
Modify cell content, style, and row/column properties.
Path: /{SheetName}/A1, /{SheetName}/A1:D10, /{SheetName}/row[N], /{SheetName}/col[A]
| Property | Accepted Values | Description |
|---|---|---|
value |
any | Cell value |
formula |
formula string | Cell formula (e.g., =SUM(A1:A10)) |
type |
string/str, number/num, boolean/bool
|
Value type |
clear |
(any value) | Clear content, formula, and style |
link |
URL or none
|
Hyperlink |
| Property | Accepted Values | Description |
|---|---|---|
font.name |
font name | Font family |
font.size |
number (pt) | Font size |
font.bold / bold
|
bool | Bold |
font.italic / italic
|
bool | Italic |
font.strike / strike
|
bool | Strikethrough |
font.underline / underline
|
true, false, single, double
|
Underline |
font.color |
hex RGB | Font color |
fill / bgcolor
|
hex RGB | Background fill |
numFmt / numberFormat
|
format code | Number format (e.g., 0%, #,##0.00) |
alignment.horizontal / halign
|
left, center, right, justify
|
Horizontal alignment |
alignment.vertical / valign
|
top, center, bottom
|
Vertical alignment |
alignment.wrapText / wrap
|
bool | Wrap text |
border.all |
border style | All borders |
border.left / border.right / border.top / border.bottom
|
border style | Per-side border |
border.color |
hex RGB | All border colors |
border.*.color |
hex RGB | Per-side border color (e.g., border.left.color) |
Border styles: thin, medium, thick, double, dashed, dotted, dashDot, dashDotDot, hair, mediumDashed, mediumDashDot, mediumDashDotDot, slantDashDot, none
Number formats: general, 0, 0.00, #,##0, #,##0.00, 0%, 0.00%, or custom format codes
officecli set data.xlsx /Sheet1/A1 --prop value="Updated"
officecli set data.xlsx /Sheet1/A1 --prop bold=true --prop font.size=14 --prop font.color=FF0000
officecli set data.xlsx /Sheet1/A1 --prop fill=FFFF00 --prop halign=center --prop wrap=true
officecli set data.xlsx /Sheet1/A1 --prop border.all=thin --prop border.color=000000
officecli set data.xlsx /Sheet1/A1 --prop numberFormat="#,##0.00"| Property | Accepted Values | Description |
|---|---|---|
merge |
bool |
true = merge, false = unmerge |
officecli set data.xlsx /Sheet1/A1:D1 --prop merge=true
officecli set data.xlsx /Sheet1/A1:D1 --prop merge=false| Property | Accepted Values | Description |
|---|---|---|
height |
number (points) | Row height |
hidden |
bool | Hide/show row |
officecli set data.xlsx /Sheet1/row[1] --prop height=30
officecli set data.xlsx /Sheet1/row[3] --prop hidden=true| Property | Accepted Values | Description |
|---|---|---|
width |
number (characters) | Column width |
hidden |
bool | Hide/show column |
officecli set data.xlsx /Sheet1/col[A] --prop width=20
officecli set data.xlsx /Sheet1/col[B] --prop hidden=trueBased on OfficeCli v1.0.6