ExcelRangeReplace(String, String, ExcelFindOptions) Method |
Replaces a text with another text in the cells of this range that contain text, with the specified options.
With
MatchEntireCellContent the whole cell text is replaced when it is equal
to the old text; otherwise every occurrence of the old text in the cell is replaced.
Formulas, numbers, dates and booleans are not changed.
Namespace: ExpertXls.ExcelLibAssembly: expertxls (in expertxls.dll) Version: 10.0.0
Syntaxpublic int Replace(
string oldText,
string newText,
ExcelFindOptions options
)
Public Function Replace (
oldText As String,
newText As String,
options As ExcelFindOptions
) As Integer
Parameters
- oldText String
- The text to replace.
- newText String
- The replacement text. Null or an empty string removes the old text.
- options ExcelFindOptions
- Match the case of the letters and/or the entire cell content.
Return Value
Int32The number of cells that were changed.
See Also