Method AddText
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
AddText(XlsxCellRange, XlsxConditionalFormatKind, string, XlsxDifferentialStyle)
Adds a rule on the text of cells: containing, not containing, beginning or ending with a text, case not counting.
public XlsxConditionalFormat AddText(XlsxCellRange range, XlsxConditionalFormatKind kind, string text, XlsxDifferentialStyle format)
Parameters
rangeXlsxCellRangeThe cells.
kindXlsxConditionalFormatKindtextstringThe text, at most 255 characters.
formatXlsxDifferentialStyleWhat the rule changes.
Returns
- XlsxConditionalFormat
The rule.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The kind is not a text rule, the text is empty or too long, or the format sets nothing.
- InvalidOperationException
The sheet is not a worksheet.