Writing values into a range of empty cell

Hey all, hopefully this is the correct place to put this question.

A little new into the UiPath scene, but I am creating a bot that automates the reading of emails with a fixed format. The whole bot is set on a loop and each time the loop runs, it would take information in the email and plot it in certain excel cells that will be generated into a PDF file for export.

I have a separate “records” sheet in the excel file that I wish for the bot to plot in a certain fixed line from each email. That way when I hand over the documents to someone there is some form of handover / takeover form.

Here’s my issue: i wish to get the bot to write that value into cells D4 to D43, which are all empty at the start. Each time an email is run, the first cell it would write on is D4, and then the second email is D5 and so on. It would make much more sense to ask the bot to search for the next empty cell and write that, but I am having trouble with 1) searching the next empty cell, and 2) what do I actually key in the write cell activity? I know is something like “D” + something to denote the next cell number.

Really appreciate any help on this! Thank you!

There are different ways to achieve this. Most common option is

We do have activity to identify the first and last row based on a column in Excel activities of UiPath. Use this activity to identify the last row and utilize the same while writing the cell. Activity name is Find First/Last Data Row

1 Like

Hey @Yukit here you can achieve that so evertime bot will erite data into the next empty cell

Excel.Sheet(“Sheet1”).Cell(“A” & LastRowIndex.ToString())

1 Like