XlsWorksheet
Replace Method (String, Double)
|
Replaces cells' values with new data.
Examples
The following code snippet illustrates how to replace the string with double:
Namespace:
Spire.Xls.Core.Spreadsheet
Assembly:
Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public void Replace(
string oldValue,
double newValue
)
Public Sub Replace (
oldValue As String,
newValue As Double
)
public:
virtual void Replace(
String^ oldValue,
double newValue
) sealed
abstract Replace :
oldValue : string *
newValue : float -> unit
override Replace :
oldValue : string *
newValue : float -> unit
Parameters
-
oldValue
-
Type:
System
String
String value to replace.
-
newValue
-
Type:
System
Double
New value for the range with specified string.
Implements
IWorksheet
Replace(String, Double)
Remarks
This can be long operation (needs iteration through all cells
in the worksheet). Better use named ranges instead and call
Import function instead of placeholders.
See Also