I have an excel template, in which first i have to count number of rows present in the template after finding the number of rows, i have to update the serial number for each row like 1,2,3,4…
The below attached is my template sample. help me to do this
Hi,
Initialize an int32 variable counter with value 1, then loop through your datatable and for each row, set the value with column name ‘#’ to the counter.
Increment the counter on each loop.
Thanks, but I have a doubt… as a first step i have to count no of rows till subtotal row in excel, based on the no of row count i have to update the serial number. can i do that using the above method
Surely, you can add an “if” condition to check when your counter is equal to the row count, you can use a “break” activity to break out of the “For Each Row in DataTable” activity.