Add data in an Excel file

Hello there,

I am trying to add data to an existing Excel file, but I’m not sure how to go about it since every column needs a different way of executing what I want to achieve. I have a ‘‘read range’’ activity in which I create a datatable and a ‘‘write range’’ that I want to use to add my data. The Excel file has the following columns:

Nr. Date Email

What I want to do is add data in the first available empty row. Now, for example, I have 510 filled in rows. How do I execute the following?

  • Nr: Every row has a nr. starting with the year (in this case 2023) with multiple digits after it. I want to make it so that the bot adds a new row with the previous nr. + 1 (so: if the previous row 510 has 2023.50 under column ‘Nr’, the new row that the robot adds has to be with the nr. 2023.51)
  • Date: The date needs to be copied from a specific email. Do I extract this by using an assign and adding ‘‘mailVariable.ReceivedDateTime’’? Please note that I’m using ‘Get Exchange’ activities, not Outlook.
  • Email: The email address of a person that was extracted earlier needs to be pasted here.

If any of you could guide me that’d be great!

Hi,

For Nr. you can get the last value from the datatable (read range output) and increment by 1.
For Date/Email - loop through all the list of mail messages and you can add Mail Received Date.
For Email - if its from the last datatable, use the same datatable output to get the last value of the email

Hi,
Thank you for your fast reply! I’m still very much a beginner, so could you please let me know which activities I would need for each step that you mentioned? Thank you!

Hey,

To loop through list of emails, you can use For each activity and to get the values from a datatable, you can use column or row positions

I suggest you to start going through the documentation.uipath.com and beginner course in academy.uipath.com

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