Thetype exposes the following members.
Gets or sets the sequence of references to cell ranges over which this ignored error is applied.
Gets or sets the ignored error types.
Returns a String that represents this instance.(Overrides ObjectToString.)
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)