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
rangeXlsxCellRangeThe cells.
errorsboolWhether cells with an error are formatted (cells without one, otherwise).
formatXlsxDifferentialStyleWhat the rule changes.
Returns
- XlsxConditionalFormat
The rule.
Exceptions
- ArgumentException
The format sets nothing.
- InvalidOperationException
The sheet is not a worksheet.