Copy and paste table in Excel onto an Email

How do I copy this table from the Excel:


And paste it onto a Outlook Email like this :slight_smile:

Complete with it’s formatting of the table.

@RobinsonFrancis

there is no direct copy paste using traditional email activities..it is recommended to use create html content to create a table like you need

ui automation is not recommended here

cheeers

Hello @RobinsonFrancis Create a HTML tags for the table you need then in the properties of outlook activity check isbodyhtml or ishtml to send the data in the tabular format in the body.

Cheers

You will have to write HTMl code to generate table and while using send mail command , select Body as HTMl and pass your html code variable

Hi @RobinsonFrancis

Please follow below approach:

  1. Have your excel table stored in a datatable.
  2. Use below command to generate html content for your table in an Assign activity. replace dt_Stats with your datatable name in below command.

  1. Then pass it along with the rest of html body of your email. Don’t forget to check “Is Html” property of your email activity.
    See example below, I am passing below in my email body wherein mailContent is some html content of the start of the email, then tableMailstr is the html content for my datatable from step 2 above and then I am passing the footer of the email as html. You can customize as per your requirement:

Hope this helps.

Regards
Sonali