Table of Contents

Method Accepts

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

Accepts(XlsxCellValue)

Returns whether the rule would accept a value, as Excel judges a value typed into one of its cells (measured with Excel's Validation.Value). A blank cell is accepted when the rule allows blanks; an error never is. A number, a date and a time are compared as numbers and a boolean compares above every number; text is refused by those types. A list compares the value's own text with its items, case counting, and a number with an item that is the same number. A text length is the length of the value's own text, not as its number format shows it.

public bool? Accepts(XlsxCellValue value)

Parameters

value XlsxCellValue

The value.

Returns

bool?

True or false; null when the answer needs a formula calculated (a bound or a list given by a reference or a name, a custom rule, until formulas are calculated) or was not measured (a list item with a space before or after it; a number at or above 1E+15 or below 1E-4 as text; text with a character outside the Basic Multilingual Plane).

Exceptions

InvalidOperationException

The rule is no longer on the sheet.