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
rangeXlsxCellRangeThe cells.
uniqueboolWhether values occurring once are formatted (duplicates otherwise).
formatXlsxDifferentialStyleWhat the rule changes.
Returns
- XlsxConditionalFormat
The rule.
Exceptions
- ArgumentException
The format sets nothing.
- InvalidOperationException
The sheet is not a worksheet.