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 Vista, Windows XP, Windows Server 2008, Windows Server 2003, Windows 2000, Windows Me and Windows 98, including 32 bit and 64 bit editions where applicable. SpreadsheetGear for .NET 1.x requires the Microsoft .NET Framework 1.1 or .NET 2.0 (works with .NET 3.x). SpreadsheetGear for .NET 2007 requires the Microsoft .NET Framework 2.0 (works with .NET 3.x).

See Also