Table of Contents

Method AddDuplicates

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

AddDuplicates(XlsxCellRange, bool, XlsxDifferentialStyle)

Adds a rule that formats values occurring more than once, or once only.

public XlsxConditionalFormat AddDuplicates(XlsxCellRange range, bool unique, XlsxDifferentialStyle format)

Parameters

range XlsxCellRange

The cells.

unique bool

Whether values occurring once are formatted (duplicates otherwise).

format XlsxDifferentialStyle

What the rule changes.

Returns

XlsxConditionalFormat

The rule.

Exceptions

ArgumentException

The format sets nothing.

InvalidOperationException

The sheet is not a worksheet.