How to write the contents of excel into email message body without loosing table formats

Hi @vishal.kumar

Image of the Excel table

Everything is dynamic in this table(including colours)

2 Likes

Hello You can download package and use exceldata activity.

1 Like

Download and install package, use exceldata to htmlstr (with formats) activity.

1 Like

Can u send me a working sample of it?

1 Like

Visit AtrimalActivitiesPack
Forum page

1 Like

Got You. Yay!!!

1 Like

Hii
I want to copy and paste the pivot table from excel to email Body.
how to do that?

1 Like

You can also try the below method to paste excel data in outlook mail body.

2 Likes

Hi @vishal.kumar , I am trying to send an email that includes a table as well as regular text. How can I add a new line within the body of the email? Usually with Environment.NewLine it will give you a new line, however, I cannot do this when IsBodyHtml is checked off. I want to include space between my text and the excel table but with IsBodyHtml checked it ignores Environment.NewLine within the body and the email is all compressed.

image

1 Like

@veselim

Can Do! use “vbCrLf”

image

image

1 Like

@Mr_Meeseeks

Do you have IsBodyHtml checked?

image
I need this checked for the excel table to properly show up in the email.

image

1 Like

@veselim

Can Do! when IsBodyHtml is checked we can use br / directly in the string to add a new line. (if you try that in the forums with the brackets it actually works here too!)

image

image

1 Like

@Mr_Meeseeks

So this is what I am getting-

image

An this is the result-

image

1 Like

@veselim

Can you please attach a copy of the xaml file? I’ll take a look at it.

1 Like

@Mr_Meeseeks

Can Do!

How to write excel data in outlook mail.xaml (21.2 KB)

Thank you!!

3 Likes

@veselim

Very Interesting! I could not recreate this on my end. Can you please tell me what version of outlook you are using?

image

It looks like all of the HTML formatting in “out_strBodyContent” works though! Lets try this: add an assign activity right before the send outlook message activity and to add the body message there.

image

In the body value for the send outlook message activity- lets keep it as out_strBodyContent and see if we have any luck.

image

It works on my end for either option so I am not sure if this will work for you (but I hope it does!)

2 Likes

yay!!! very nice, thanks

1 Like

thanks for providing the info!

1 Like

@Mr_Meeseeks

Yes, the assign worked! Great Job!

Hello
Try this. You can download this package and use the activity.
(https://connect.uipath.com/marketplace/components/datatable-to-html-table)