Read Username & Date and modify date at end of script datatable

Hey, I am unable to solve this problem…

I have a script which reads from an excel file which contains two columns, username and date/time.

I want to read the username and it’s corresponding date. At the end of the script I want to to modify the date for specific username in Excel.

Thank you.

Eg:

Start of script
User1 -> 4/10/2020

End of script
User1 -> 5/10/2020

This has to be done for all usernames and date is variable. (Actually it is current time, not date. I used date as example to simplify).

Have to use for each row for it to be useful.

Thank you…!

Hi @Munish_Jain,

This is doable in a small workflow. Your approach should be:

  1. Reading the excel file and store the values in a datatable
  2. Use the For Each Row activity (datatable activity) and within it we loop until we find the “RequiredUser”
  3. When we find the “RequiredUser”, we update the corresponding value in the Date column to the “RequiredDate/Time”
  4. Finally, write the processed datatable either in the same input file or in generate a new modified.xslx file using Write Range activity in the excel scope.

I have attached a solution EditUserRecords.zip (35.4 KB), which peforms these following steps. Since my input data was in Date format, I used the solution from this thread to update the date column to datetime type.
Hope this helps!

1 Like

Thank you! Will check it out and update if its working or not.

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