Xceed Workbooks for .NET v2.0 Documentation
ReplaceContents<TSearch,TNew> Method (LinearWorksheetElement)


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > LinearWorksheetElement 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

Searches into the content of the LinearWorksheetElement and replaces all instances of the SearchValues with their corresponding NewValues.
Syntax
'Declaration
 
Public Function ReplaceContents
    (Of TSearch,TNew)( _
   ByVal searchValues As IEnumerable(Of TSearch), _
   ByVal newValues As IEnumerable(Of TNew) _
) As Integer
'Usage
 
Dim instance As LinearWorksheetElement
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 LinearWorksheetElement.
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

Reference

LinearWorksheetElement Class
LinearWorksheetElement Members