Use the “Read Range” activity to read the merged Excel sheet into a DataTable. Store the output in a variable, let’s say dtMerged.
Use the “Add Data Column” activity to add a new column named “Serial Number” to dtMerged. Set the DataType to System.Int32.
Use a “For Each Row” activity to iterate through each row in dtMerged.
Inside the loop, use an Assign activity to set the value of the “Serial Number” column for each row. You can use the RowIndex property of the DataRow object to get the current row index.Assign activity:
Note: row is the variable representing the current DataRow object.
5. Finally, use the “Write Range” activity to write the updated DataTable back to the Excel file.