-
Notifications
You must be signed in to change notification settings - Fork 599
excel duplicatevalues
goworm edited this page Jun 26, 2026
·
1 revision
A conditional-formatting rule that highlights duplicate values within a cell range.
Path: /{SheetName}/cf[N]
- add - Create a duplicate-values rule on a range with a differential format
- get - Read back the rule's attributes
Parent: /{SheetName}
| Property | Required/Default | Description |
|---|---|---|
ref |
yes | Target cell range. Aliases: sqref, range (e.g., A1:A100) |
fill |
Background fill color via dxf | |
font.color |
Font color via dxf | |
font.bold |
Bold via dxf | |
stopIfTrue |
Stop evaluating subsequent CF rules when this rule applies |
| Attribute | Type | Description |
|---|---|---|
ref |
string | Target cell range |
type |
string | Canonical CF rule type token (e.g. duplicateValues). Emitted on every CF rule |
dxfId |
number | Differential format id referencing dxf styles. Emitted only when present on the rule |
# Highlight duplicate values in A1:A100 with a light-red fill
officecli add data.xlsx /Sheet1 --type duplicatevalues \
--prop ref=A1:A100 \
--prop fill=FFCCCC
# Duplicate-values rule with a red, bold font
officecli add data.xlsx /Sheet1 --type duplicatevalues \
--prop ref=A1:A100 \
--prop font.color=FF0000 \
--prop font.bold=true
# Stop evaluating further CF rules once this one matches
officecli add data.xlsx /Sheet1 --type duplicatevalues \
--prop ref=A1:A100 \
--prop fill=FFCCCC \
--prop stopIfTrue=true
# Read back a rule
officecli get data.xlsx /Sheet1/cf[1]- The rule highlights cells whose values are duplicated elsewhere in the target range.
- The
fill,font.color, andfont.boldproperties are applied through a differential format (dxf); on read-back the rule exposes itsdxfIdonly when one is present. -
refaccepts the aliasessqrefandrange.
- Conditional Formatting - Data bars, color scales, icon sets, and formula-based rules
- Excel Reference - All Excel elements
Based on OfficeCLI v1.0.119