-
Notifications
You must be signed in to change notification settings - Fork 609
excel uniquevalues
goworm edited this page Jun 26, 2026
·
1 revision
A conditional-formatting rule that highlights the unique values in a cell range.
Path: /{SheetName}/cf[N]
- add - Create a unique-values rule over a range, with optional dxf styling
- get - Read back the rule's canonical type and dxf reference
Parent: /{SheetName}
| Property | Required/Default | Description |
|---|---|---|
ref |
required | Target cell range. Aliases: sqref, range. |
fill |
Background fill via dxf (color). | |
font.color |
Font color via dxf (color). | |
font.bold |
Bold via dxf (bool). | |
stopIfTrue |
Stop evaluating subsequent CF rules when this rule applies (bool). |
| Attribute | Type | Description |
|---|---|---|
type |
string | Canonical CF rule type token (e.g. dataBar, colorScale, iconSet, formula, topN, cellIs, containsText, aboveAverage, duplicateValues, uniqueValues, timePeriod). Emitted on every CF rule. |
ref |
string | Target cell range. Aliases: sqref, range. |
dxfId |
number | Differential format id referencing dxf styles. Emitted only when present on the rule. |
# Highlight unique values in A1:A100 with a yellow fill
officecli add data.xlsx /Sheet1 --type uniquevalues \
--prop sqref=A1:A100 --prop fill=FFFF00
# Unique values with red bold font and no fill
officecli add data.xlsx /Sheet1 --type uniquevalues \
--prop ref=A1:A100 \
--prop font.color=FF0000 \
--prop font.bold=true
# Stop evaluating later CF rules when this one matches
officecli add data.xlsx /Sheet1 --type uniquevalues \
--prop range=B2:B50 --prop fill=FFFF00 \
--prop stopIfTrue=true
# Read back a rule
officecli get data.xlsx /Sheet1/cf[1]- The rule highlights cells whose values appear only once within the target range.
-
refaccepts the aliasessqrefandrange; all three name the same target range. -
fill,font.color, andfont.boldare applied through a differential format (dxf); the resultingdxfIdis readable viagetwhen present. -
typeanddxfIdare read-only and surface only throughget.
- Conditional Formatting - Data bars, color scales, icon sets, and formula-based rules
- Excel Reference - All Excel elements
Based on OfficeCLI v1.0.119