Adjust Mail Body format

Dear Team,

I have a CSV file that contains data which I need to modify by applying color to the headers, formatting the cells, and then sending it within the email body.
if anyine know please elaborate

Does this set of steps help you?

  1. Read CSV: Use the “Read CSV” activity to read the data from your CSV file into a DataTable. This will allow you to work with the data in UiPath.
  2. Apply Formatting:
  • To format the headers, you can loop through the columns of the DataTable and set the background color, font, or any other formatting you desire for the header cells.
  • To format the cells, you can similarly loop through the rows and columns of the DataTable to apply formatting to individual cells.
  1. Export to Excel: Since Excel provides more extensive formatting options, you can write the DataTable to an Excel file using the “Write Range” activity. This will preserve the formatting you applied to the DataTable.
  2. Send Email:
  • Use the “Send Outlook Mail Message” or “Send SMTP Mail Message” activity to compose and send the email.
  • Attach the Excel file you created in the previous step to the email.
  • You can either attach the Excel file as an attachment or embed it within the email body, depending on your requirements.

Let me know! :slight_smile:

You do this by turning it into HTML in a variable then using the variable in the email body. There are tons of posts on doing HTML tables in emails, if you search the forum.