How to read data from Excel and then submit an email per row of data?

Good Day

We have experimented with a few aspects of Workfusion RPA Express, and have been amazed by the potential.

A final POC is to leverage RPA Express to obtain a prepared Excel spreadsheet, and then use the information therein to generate emails in MS Outlook.

The Excel spreadsheet for the POC has 2 columns, namely: policy number and email address. The number of rows will fluctuate each month.

Sample Data.xlsx (8.9 KB)

We are comfortable with using the recorder to generate an email for the first row of data i.e. email address value is typed into “To” placeholder in MS Outlook and the policy number value is typed into the “Email Body”. However, the number of rows will fluctuate each month i.e. we need to iterate this.

Having read some forum posts I must mention that we have not made use of lists/tables/variables to achieve the above, merely the recorder.

Can someone please assist with insight or sample code to code and iterate? Thank you in advance.

You should read the data to a Table variable using Get Range and then iterate through it using “For Each” loop.
In order to access a particular cell in a row, use index.


Thank you very much Ashapkina - your recommendation worked perfectly, we have managed to solve and automate based on this. Appreciate your assistance immensely.