WorkbookReplace Method (String, DataTable)
Replaces cells' values with data from a DataTable.

Namespace: Aspose.Cells
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.10.0.0 (19.10)
Syntax
public int Replace(
	string placeHolder,
	DataTable insertTable
)

Parameters

placeHolder
Type: SystemString
Cell placeholder
insertTable
Type: System.DataDataTable
DataTable to replace

Return Value

Type: Int32
Examples
 [C#]

 Workbook workbook = new Workbook();
 DataTable myDataTable = new DataTable("Customers");
 // Adds data to myDataTable
 ........
 workbook.Replace("AnOldValue", myDataTable);

 [Visual Basic]

 Dim workbook As Workbook =  New Workbook() 
 Dim myDataTable As DataTable =  New DataTable("Customers") 
 ' Adds data to myDataTable
.............
 workbook.Replace("AnOldValue", myDataTable)
See Also