SpreadsheetGear The Performance Spreadsheet Component Company 
Replace Method
See Also 
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

C# 
virtual 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 98, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family. SpreadsheetGear for .NET 1.x requires the Microsoft .NET Framework 1.1 or .NET 2.0. SpreadsheetGear for .NET 2007 requires the Microsoft .NET Framework 2.0.

See Also