GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    IgnoredErrorCollection Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a collection of an ignored errors in the worksheet.

    • C#
    • VB.NET
    public sealed class IgnoredErrorCollection : IEnumerable<IgnoredError>, IEnumerable
    Public NotInheritable Class IgnoredErrorCollection
        Implements IEnumerable(Of IgnoredError), IEnumerable
    Inheritance:
    System.Object
    IgnoredErrorCollection
    Implements
    System.Collections.Generic.IEnumerable<IgnoredError>
    System.Collections.IEnumerable
    Remarks

    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.

    Properties

    Count

    Gets the number of IgnoredErrors contained in the IgnoredErrorCollection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of IgnoredErrors contained in the IgnoredErrorCollection.

    Item[Int32]

    Gets the IgnoredError at the specified index.

    • C#
    • VB.NET
    public IgnoredError this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As IgnoredError
    Parameters
    index
    System.Int32

    The zero-based index of the IgnoredError to get.

    Property Value
    IgnoredError

    The IgnoredError at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or is equal to or greater than Count.

    Methods

    Add(String, IgnoredErrorTypes)

    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.

    • C#
    • VB.NET
    public IgnoredError Add(string appliesTo, IgnoredErrorTypes errorTypes)
    Public Function Add(appliesTo As String, errorTypes As IgnoredErrorTypes) As IgnoredError
    Parameters
    appliesTo
    System.String

    The sequence of references to cell ranges over which the newly added ignored error is applied.

    errorTypes
    IgnoredErrorTypes

    The errors which should be ignored.

    Returns
    IgnoredError

    A newly created and added IgnoredError.

    Exceptions
    System.ArgumentException

    Parameter appliesTo is null or System.String.Empty.

    Clear()

    Removes all IgnoredErrors from the IgnoredErrorCollection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    GetEnumerator()

    Returns an enumerator that iterates through the IgnoredErrorCollection.

    • C#
    • VB.NET
    public IEnumerator<IgnoredError> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of IgnoredError)
    Returns
    System.Collections.Generic.IEnumerator<IgnoredError>

    An enumerator that can be used to iterate through the IgnoredErrorCollection.

    Remove(IgnoredError)

    Removes the specified IgnoredError from the IgnoredErrorCollection.

    • C#
    • VB.NET
    public bool Remove(IgnoredError ignoredError)
    Public Function Remove(ignoredError As IgnoredError) As Boolean
    Parameters
    ignoredError
    IgnoredError

    The IgnoredError to remove from the IgnoredErrorCollection.

    Returns
    System.Boolean

    true if IgnoredError is successfully removed; otherwise, false. This method also returns false if IgnoredError was not found in the IgnoredErrorCollection.

    RemoveAt(Int32)

    Removes the IgnoredError at the specified index of the IgnoredErrorCollection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the IgnoredError to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or is equal to or greater than Count.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.