IgnoredError Class

Ignored Error.When the object is serialized out as xml, its qualified name is x:ignoredError.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Spreadsheet.IgnoredError

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class IgnoredError _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As IgnoredError
public class IgnoredError : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

18.3.1.50 ignoredError (Ignored Error)

A single ignored error for a range of cells.

A cell is considered to have an error condition when it meets one of the conditions specified in the attribute descriptions below. [Example: If a cell is formatted as text but contains a numeric value, this is considered to be a potential error because the number won't be treated as a number, for example, in calculations. end example]

This is simply a guess by the implementing application, and a recommendation to the user. Cells with the errors specified below might be deliberately defined as such. [Example: A cell formatted as text which contains numeric Postal Codes or Order numbers. It is useful to format these cells as text so that leading zeros remain as part of the value instead of being removed. end example]

An <ignoreError> element is not written in the file unless the user has specifically reviewed the error and decided to keep the cell state as it is, and no longer wishes to be alerted about it for this cell. This can be helpful for the application to decide which errors should be surfaced to the user vs kept quiet because the user doesn't want these to be surfaced (e.g., because they are legitimate cell states).

[Example:This example shows that cells A1 and B2 both contain numbers stored as text, and this error has been reviewed and specifically flagged to be no longer surfaced as an error to the user.

<ignoredErrors>
<ignoredError sqref="A1 B2" numberStoredAsText="1"/>
</ignoredErrors>

end example]

More than one kind of error can exist on a cell. These flags are not mutually exclusive.

Parent Elements

ignoredErrors (§18.3.1.51)

Attributes

Description

calculatedColumn (Calculated Column)

Ignore errors when cells contain a value different from a calculated column formula. In other words, for a calculated column, a cell in that column is considered to have an error if its formula is different from the calculated column formula, or doesn't contain a formula at all.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

emptyCellReference (Empty Cell Reference)

Ignore errors when formulas refer to empty cells.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

evalError (Evaluation Error)

Ignore errors when cells contain formulas that result in an error.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

formula (Formula)

Ignore errors when a formula in a region of your worksheet differs from other formulas in the same region.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

formulaRange (Formula Range)

Ignore errors when formulas omit certain cells in a region.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

listDataValidation (List Data Validation)

Ignore errors when a cell's value in a Table does not comply with the Data Validation rules specified.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

numberStoredAsText (Number Stored As Text)

Ignore errors when numbers are formatted as text or are preceded by an apostrophe.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

sqref (Sequence of References)

Reference to a range of cells that have this ignored error.

The possible values for this attribute are defined by the ST_Sqref simple type (§18.18.76).

twoDigitTextYear (Two Digit Text Year)

Ignore errors when formulas contain text formatted cells with years represented as 2 digits.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

unlockedFormula (Unlocked Formula)

Ignore errors when unlocked cells contain formulas.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_IgnoredError) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

IgnoredError Members

DocumentFormat.OpenXml.Spreadsheet Namespace