-
Notifications
You must be signed in to change notification settings - Fork 532
command set
zmworm edited this page Mar 23, 2026
·
52 revisions
Modify properties of a document element.
officecli set <file> <path> --prop <key=value> [--prop <key=value> ...]
Modifies one or more properties of the element at the specified path. Multiple properties can be set by repeating --prop. Reports which properties were applied and which were unsupported.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
file |
FileInfo | Yes | - | Office document path |
path |
string | Yes | - | DOM path to the element |
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
--prop |
string (repeatable) | Yes | - | Property in key=value format |
-
Word set - All settable elements in
.docx -
Excel set - All settable elements in
.xlsx -
PowerPoint set - All settable elements in
.pptx
- Property keys are case-insensitive.
- Boolean values:
true/1/yes(truthy),false/0/no/empty (falsy). - Color values: hex RGB without
#prefix (e.g.,FF0000). - Dimensions: EMU or with unit suffix (
cm,in,pt,px).
- Command Reference
- get - Inspect element before modifying
- add - Add new elements
Based on OfficeCLI v1.0.18