1. Read the Excel Data:
Use the Excel Application Scope activity to open your Excel file.
Use the Read Range activity to read the data into a DataTable. 2. Iterate Through Each Row:
Use the For Each Row activity to loop through each row of the DataTable. 3. Calculate Row Index:
Use an Assign activity to calculate the row index.
rowIndex = DataTable.Rows.IndexOf(currentRow) + 2
This adds 2 to the row index to match Excel’s row numbering.
4. Write Formula to Cells:
Use the Write Cell activity to write the formula into the specific cells.
For Each row As DataRow In dt.Rows
If row("Current status").ToString.Contains("no service") AndAlso row("New service launch").ToString.Contains("inbound/bilateral") Then
row("Action") = "Addition"
End If
If row("Current status").ToString.Contains("not= no service") AndAlso row("New service launch").ToString.Contains("inbound/bilateral") Then
row("Action") = "Modification"
End If
If row("Current status").ToString.Contains("Bilateral/Inbound/outbound") AndAlso row("New service launch").ToString.Contains("outbound/unilateral") Then
row("Action") = "Deletion"
End If
Next