Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface > Replace Method : Replace(String,DataColumn,Boolean) Method
The string to be replaced.
Data table with new data.
Indicates whether field name must be shown.

Replace(String,DataColumn,Boolean) Method

Replaces string with the specified datacolumn value.
Syntax
'Declaration
 
Overloads Sub Replace( _
   ByVal oldValue As String, _
   ByVal newValues As DataColumn, _
   ByVal isFieldNamesShown As Boolean _
) 
'Usage
 
Dim instance As IWorksheet
Dim oldValue As String
Dim newValues As DataColumn
Dim isFieldNamesShown As Boolean
 
instance.Replace(oldValue, newValues, isFieldNamesShown)

Parameters

oldValue
The string to be replaced.
newValues
Data table with new data.
isFieldNamesShown
Indicates whether field name must be shown.
Remarks
This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.
Example
The following code snippet illustrates how to replace the string value with data column.
// create the data table
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Rows.Add(1); 
DataColumn dataColumn = table.Columns[0];
// Replace the value with data column.
sheet.Replace("AB2", dataColumn, true);
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also