I have a datatable containing,
Invoice number, starting index, ending
abc,2,2
zyz,3,6
So, i want to write in the rows from starting index to ending index, like in a column i want to write success in particular rows. How am i able to do it?
Please use do while acitivty to loop from start index to ending index and assign your invoice number value to desired column using this syntax: your_datatable_name.Rows(index)(column_name).
Use the Read Range activity to read the DataTable and store it in a variable (e.g., dtInvoice).
Add a For Each Row activity and set the DataTable property to dtInvoice.
Within the For Each Row loop, add an If activity. In the condition, check if the row index (use dtInvoice.Rows.IndexOf(row) + 2 to account for 0-based index and the header row) is greater than or equal to the starting index and less than or equal to the ending index.
Inside the If activity, add an Assign activity to set the value “Success” in the desired column (e.g., dtInvoice.Rows(dtInvoice.Rows.IndexOf(row))(“Status”) = “Success”).