Reading from Excel and Mailing

I have 12 rows of data in an excel file . There is a distributor code in the first columns. There are 4 distributors in the 12 records , each having 3 records each. One of the column also has the email ID of the distributor. I want to select the 3 records of invoices outstanding for each distributor and sending them reminder through email by copying the entire record of the row ( effectively 3 records in 3 rows) .

I tried the Do While method to read each record based on the distributor code in A1 , A2,A3 but not able to break the loop at A4 since A4 starts with a new distributor code. I want to extract the three records of each distributor , paste them in a separate Excel File , save it as PDF and send to the distributor . The records which I want to read and save in a separate File reads all the 12 records instead of just the 3 which has a common distributor code or ID . How to resolve this

If you are reading it into a data table you can filter the data table down to unique distributor codes (example), then foreach distributor id in the list, filter your original data by the ID variable using the filter data table activity, and loop over the resulting lines. This would allow you to output your results and send the email at the end of processing each distributor.

@Nirav_Gandhi

Welcome to Forums

You can check below component

Hope this helps you

Thanks

1 Like