How to Copy Excel table to Outlook body

Hi, I want to put or Copy my excel table to my email Body.

Here is My Excel, This is Dynamic Data, sometimes its more than one or two data in the table.
image

I wanted to copy the table and put it in my email template.
Here is my Email Template.

My expected output should be like this.

Thank you in advance
-Vincent

Hi @Vincent_Nuestro ,

You can follow below video

For reference

1 Like

Hi @ermanoj3101

Why i am getting error in my For each
Error Says : ‘)’ expected

Hi @Vincent_Nuestro,

You can read the excel and store data in DataTable.

you can add this activity package to your project(from manage packages), which takes DataTable as input and gives result as String.

DataTable.to.HTML.String.1.0.2.nupkg (23.8 KB)

While sending the mail check IsBodyHTML propertie like below

Thanks,
saiKrishna

Hi @sai_krishna_somisetty ,

Try to use “for each” as shown below

foreach (DataRow row in FilteredDt.Rows)
{
    
}

Hi @Vincent_Nuestro

Please use my package,

There is an activity called convert to html which has lot of customization as well

Thanks

1 Like

Hi @Vincent_Nuestro

If the issue got resolved,please mark it as solution and close the thread so it may be useful to others in the future.

Thanks

Hi @prasath_S

Im still learning this package, can you recommend me how to use this properly to resolve my issue?

@Vincent_Nuestro yes sure

Please try the below steps,

  1. Read the data in the excel sheet using read range and store it a datatable variable name dt.

  2. Install the package and you will find 15 activites inside this package for now please use convert to html activity.

  3. Pass the datatable dt as input for the activity and store the output in a string variable named result.(create one if it don’t have already)

  4. Use any send mail activity and pass the result in the body in the property.

  5. Change the font, font color,font size, header and border as you want in the properties panel of the convert to html activity.

Please let me know if anything required.

Thanks

1 Like

Hi @Vincent_Nuestro have you tried it?

Thanks

1 Like

Hi @Vincent_Nuestro

Thanks for using the package, and from the screenshot I can see that the number of columns are more, because the outlook table is not having as many column size as excel,it will auto adjust to the screen size.the outlook tables has its limitations of how many columns it can display without breaking it’s structure as you have.

There are some ways we can test it,

  1. If you can reduce some columns it will align perfectly.

  2. If you see the table in bigger monitor instead of a laptop it will adjust the table contents to the screen size.

As for I know it will break the alignment it has more columns (also each column size is big) and see the content in small screen (like laptop)

Thanks

1 Like

I see, Got it. Thank you So much:)

1 Like

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