How to paste the table which is in the excel along with format in mail body

How to paste the table which is in the excel along with format in mail body.
The table has some formats like orders and colours. How to copy paste the table into body of mail.

Hi @anjani_priya

Can you share the input excel file.

Regards

@anjani_priya Use the “Copy/Paste Range” activity in Excel to transfer the table from one sheet to another while preserving the column formatting.

Cheers! Happy Automating! :rocket::blush:

The table should be paste in the body of the mail.

@anjani_priya

there is no direct way

you would need to read the data and formatting of cells and create the html table

rather better approach would be to try taking a screenshot or save the excel as pdf and then attach it

cheers

Hello @anjani_priya

You could check out the Datatable Activities package from @lakshman in the UiPath Marketplace package source.

I can see that he has developed an activity called Datatable to HTML which would probably solve your request.

Regards
Soren

@anjani_priya Use the “Create HTML Content” activity to format data values as a table, then include the table in the email content to display the data in the email.


I couldnt find

how can I crop automatically

file.xlsx (10.8 KB)

Hi @anjani_priya

We cant use html content activity since the format does not get preserved ! Use the below workflow

Check the xmal
Main.xaml (13.1 KB)

Output email image


Hope this helps !

2 Likes

@anjani_priya
Steps to add DataTable in mail content

  1. Open HTML Content Createor
  2. Click on Add Data Values in the top right corner.
  3. Add map values and select “Add Value” type as Table and provide a Data Table Variable to the Table and close the popUp
  4. Click on HTML content> click on “Add Data Values” and Select the variable/table to add

Please find the attached Xaml file and will help you in practically.
Sequence2.xaml (12.9 KB)

1 Like

How to add the screenshot picture in the body of the mail?

Convert the picture to base64string
base64image = Convert.ToBase64String(System.IO.File.ReadAllBytes(“filePath”))
and then in mail body you can add html string
"<img src='data:image/jpg;base64," & base64image & "' width='750' height='800' align='center'/>"’

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.