XlsWorksheet
Replace Method (String,
Int32
, Boolean)
|
Replaces cells' values with new data.
Examples
The following code snippet illustrates how to replace the string with array of int values:
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,
int[] newValues,
bool isVertical
)
Public Sub Replace (
oldValue As String,
newValues As Integer(),
isVertical As Boolean
)
public:
virtual void Replace(
String^ oldValue,
array<int>^ newValues,
bool isVertical
) sealed
abstract Replace :
oldValue : string *
newValues : int[] *
isVertical : bool -> unit
override Replace :
oldValue : string *
newValues : int[] *
isVertical : bool -> unit
Parameters
-
oldValue
-
Type:
System
String
String value to replace.
-
newValues
-
Type:
System
Int32
Array of new values.
-
isVertical
-
Type:
System
Boolean
Indicates whether array should be inserted vertically.
Implements
IWorksheet
Replace(String,
Int32
, Boolean)
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