SpreadsheetGear
Replace Method
See Also  Send Feedback
SpreadsheetGear Namespace > IRange Interface : Replace Method

what
Specifies the text to to find.
replacement
Specifies the replacement text.
lookAt
Specifies partial or complete match.
searchOrder
Specifies whether to search by rows or by columns.
matchCase
Specifies whether text searches should match case.
Attempts to replace the specified text according to the specified options, returning the number of replacements if successful or zero if not successful.

Syntax

Visual Basic (Declaration) 
Function Replace( _
   ByVal what As String, _
   ByVal replacement As String, _
   ByVal lookAt As LookAt, _
   ByVal searchOrder As SearchOrder, _
   ByVal matchCase As Boolean _
) As Integer
C# 
int Replace( 
   string what,
   string replacement,
   LookAt lookAt,
   SearchOrder searchOrder,
   bool matchCase
)

Parameters

what
Specifies the text to to find.
replacement
Specifies the replacement text.
lookAt
Specifies partial or complete match.
searchOrder
Specifies whether to search by rows or by columns.
matchCase
Specifies whether text searches should match case.

Return Value

Returns the number of replacements if successful or zero if not successful.

Remarks

Locked cells in a protected worksheet will be ignored.
Array formulas will be ignored in cells other than the top-left cell of the array formula range. Replacing the formula in the top-left cell of the array formula range will modify all formulas in the array formula range.

Requirements

Platforms: Windows 2000, Windows XP, Windows Vista, Windows Server 2003 and Windows Server 2008. SpreadsheetGear 2008 requires the Microsoft .NET Framework 2.0 and supports .NET 3.0 and .NET 3.5.

See Also

Copyright © 2003-2009 SpreadsheetGear LLC. All Rights Reserved.Help Powered by Innovasys   
SpreadsheetGear is a registered trademark of SpreadsheetGear LLC.
Microsoft, Microsoft Excel and Visual Studio are trademarks or registered trademarks of Microsoft Corporation.