Is it possible to read range an excel and store each row's location into a column?

Hi! I have this quite a big Datatable has around 2000 rows to check. I am read ranging all of it, and divide the DT into two, based on a value of a certain column. I will divide the DT into "Processed and “Unprocessed” status of the “Status” Column in the Datatable. After dividing it, I’ll do a two different set activities for each Datable. After that, I’ll change the “Unprocessed” rows as “Processed” and Updates an empty column(after status) after processing the “Processed” rows. My problem is, How can I mark the row location of each entries, when they are mismatched and would be filtered in the process.
I was thinking that If I have their row location, I’ll to like For each row in DT_Unprocess. Write Cell the Cell Location to "Process" I hope you can help me. Thank you


Let’s go step by step

  1. After dividing the datatable based on processed and unprocessed

  2. Use add datacolumn activity and mention the new columnname as “New_Status” and datatable as - say dt_unprocessed the name of the datatable which has unprocessed status data

  3. If you are using FOR EACH ROW activity you can get the row location with the row index

Like this

Where row is the variable of the FOR EACH ROW activity and This gives the current row position of the loop

Once after updating the datatable we can directly write that datatable back to the same excel and it will overwrite with new column
And it won’t require write cell activity

Cheers @Shinjid

Thanks! I get the logic of it. I just did some changes as I forgot about my error handlings in this one. But it worked so, thank you :slight_smile:

1 Like

Happy automation @Shinjid

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.