How to stamp a list of rows in excel with variable

Hi All,

Any help on this would be appreciated.

Current process:

  1. Read list of dates from excel file (1 year: 365 dates prior to today)
  2. Input the first date to currency exchange website
  3. Extract list of historic exchange rates into datatable
  4. Append to excel sheet
  5. Loop through all 365 dates in the original list

What I would like to add:

  1. Add the date variable into a new column as a date stamp every time a list of currencies are extracted.

** I am currently using another loop to stamp each row, however this takes too long as there are 168 currencies (rows). Please see desired output below.

Thanks!
Peter

Currency%20Screenshot

@peter92,

Welcome to our Community!.
Thanks for posting your query in UiPath Developer Forum.

After extracting the list of historic exchange rates into a datatable you can add a new column to that and populate it with the desired date value in it. Then you can write it into the excel as you want. Hope this makes sense, let me know if in case any further query.

Hi @sarathi125

Thanks for your response. Apologies, I am new to UiPath and have a few more questions.

Would this add a new column for each new date in the loop?

Currently, each date is brought into the loop using For Each Row. I’m not sure how this variable can be applied to each extracted row using the Add Data Column activity? What would the input contain so the date variable is applied to all currencies in the output for that particular date?
Currency%20Screenshot5