Table of Contents

Method AddErrors

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

AddErrors(XlsxCellRange, bool, XlsxDifferentialStyle)

Adds a rule that formats cells holding an error, or those that do not.

public XlsxConditionalFormat AddErrors(XlsxCellRange range, bool errors, XlsxDifferentialStyle format)

Parameters

range XlsxCellRange

The cells.

errors bool

Whether cells with an error are formatted (cells without one, otherwise).

format XlsxDifferentialStyle

What the rule changes.

Returns

XlsxConditionalFormat

The rule.

Exceptions

ArgumentException

The format sets nothing.

InvalidOperationException

The sheet is not a worksheet.