Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / StyledRange<T> Class / ReplaceContents<TSearch,TNew> Method
The values that will be searched for.

The values that will replace all found instances of the searchValues.

Note that the replacement will respect the position of the data in the searchValues & will follow the established order when replacing said data with the corresponding newValues



In This Topic
    ReplaceContents<TSearch,TNew> Method (StyledRange<T>)
    In This Topic
    Searches into the content of the range and replaces all instances of the searchValues with their corresponding newValues.
    Syntax
    'Declaration
     
    
    Public MustOverride Function ReplaceContents
        (Of TSearch,TNew)( _
       ByVal searchValues As IEnumerable(Of TSearch), _
       ByVal newValues As IEnumerable(Of TNew) _
    ) As Integer
    'Usage
     
    
    Dim instance As StyledRange(Of T)
    Dim searchValues As IEnumerable(Of TSearch)
    Dim newValues As IEnumerable(Of TNew)
    Dim value As Integer
     
    value = instance.ReplaceContents(Of TSearch, TNew)(searchValues, newValues)

    Parameters

    searchValues
    The values that will be searched for.
    newValues

    The values that will replace all found instances of the searchValues.

    Note that the replacement will respect the position of the data in the searchValues & will follow the established order when replacing said data with the corresponding newValues

    Type Parameters

    TSearch
    TNew

    Return Value

    Returns how many instances of the searchValues were replaced within the content of the range.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also