Use a “Read Range” activity to read the data from the source file (e.g., Excel) into a DataTable variable. Make sure to specify the range or sheet name as needed.
Use a “For Each Row” activity to loop through each row in the DataTable.
Inside the “For Each Row” loop, use the “Get Row Item” activity to access the values in the “Initial E&M” and “Ending E&M” columns for the current row. You can use the column names or column indices to retrieve the values.
Use an “IF” activity to compare the values using the conditions you provided. For example, you can use regular expressions to match the values. Here’s an example of a condition:
`This condition checks if the “Initial E&M” value is a four-digit number using a regular expression.
5. Based on the comparison result, use an “Assign” activity to update the “Column C” value accordingly. For example, you can use the “Set Row Item” activity to update the value in the DataTable.
row(“Column C”) = “Value if true”
If the condition is false:
row(“Column C”) = “Value if false”
Continue looping through each row in the DataTable until all rows are processed.
After the loop, you can write the updated DataTable back to a file using a “Write Range” activity if needed.