Hi
I have an excel sheet 1 from cell B (name) and cell D (ID_no) would like to put them into email body.
EG. When it recognize New York is in US country then will write them in email A template with cell B2 and D2 text value in one row. when it recognize LA is in US country also write cell B3 and D3 text value in another row in email.
But when it recognize London is in UK country write them in email B template with cell B5 and D5 text value in one row.
If I understand correctly you want to send email for each country spearately with respective details.Please follow as below. Let us say data is in dt
First you have to get the unique country details for that please create a datatable countrydt =dt.DefaultView.ToTable(True,{"country"})
Now use for loop on this countrydt
Inside the loop use a filter datatable and filter the dt to get all the rows related to the country and get data into filtereddt …in filter you have to give country equals currentrow("country") and in the filter options you will columns table…where you will keep only name and id_no
Next activity inside loop will be a send email activity where you have option to provide html content and add the datatable to it
First you have to get the unique country details for that please create a datatable countrydt =dt.DefaultView.ToTable(True,{"country"}) ← generate data table activity? or assign activity?
Im using Send mail activity. May i know how to put html in body part?
extract Date from excel.
Even though excel only have yyyyMMdd, it write hours,minutes,seconds(00:00:00)
I want to extract only yyyyMMdd. How could it be possible? Try preserve format in read range activity.
Before for each row use a write text file activity and pass text as “” .so it will write a empty text on the text file.
You can also try this package for convert excel range to html table,
HTML Table from Excel with Formatting - RPA Component |
Its a grouping email.
may i please know after the for each activity, its ok the message box activity? any other activity after that? coz I can only see the below activities.
Do I do if condition as there will be 2 different email send (Template A with condition country - US and Canada), (Template B email with condition country - UK)? Thanks