Thetype exposes the following members.
Gets the number of IgnoredErrors contained in the .
Gets the IgnoredError at the specified index.
Adds a new instance of an IgnoredError which instructs application to ignore all errors specified in the errorTypes parameter on the sequence of references to cell ranges specified in the appliesTo parameter.
Removes all IgnoredErrors from the .
Returns an enumerator that iterates through the.
Removes the specified IgnoredError from the .
Removes the IgnoredError at the specified index of the .
A cell is considered to have an error condition when it meets one of the conditions specified in the ErrorTypes member. For 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.
Note that this is simply a guess by the implementing application, and a recommendation to the user. Cells with the errors specified in IgnoredErrorTypes may have perfectly valid reasons for being in such a state, for 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.
Following example shows that cells A1 and B1 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.
var workbook = new ExcelFile(); var worksheet = workbook.Worksheets.Add("Sheet1"); worksheet.Cells["A1"].Value = "00385"; worksheet.Cells["B1"].Value = "00387"; worksheet.IgnoredErrors.Add("A1 B1", IgnoredErrorTypes.NumberStoredAsText);
Dim workbook = New ExcelFile() Dim worksheet = workbook.Worksheets.Add("Sheet1") worksheet.Cells("A1").Value = "00385" worksheet.Cells("B1").Value = "00387" worksheet.IgnoredErrors.Add("A1 B1", IgnoredErrorTypes.NumberStoredAsText)