Click or drag to resize

ExcelWorksheetIgnoredErrors Property

Gets the ignored errors applied on cell ranges of this sheet.

Currently supported in XLS and XLSX.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version:
public IgnoredErrorCollection IgnoredErrors { get; }

Property Value

Type: IgnoredErrorCollection
The ignored errors applied on cell ranges of this sheet.

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);
See Also