Aligning table in email body

Hi all,

I am trying to align the table in the email body. Code is as such.

Body+“”+CurrentRow.item(0).tostring+“”+CurrentRow.item(1).tostring+“”+CurrentRow.item(2).tostring+“”+CurrentRow.item(3).tostring+“”+CurrentRow.item(4).tostring+“”+CurrentRow.item(5).tostring+“”

Where can I make changes?

@Mythras you have a datatable ? right
please try this
DataTableToHtml.xaml (21.1 KB)

Hi @Mythras ,

Check this below link to send an table in email body,

Hope this may help you :slight_smile:

Hi @Mythras

U can use this snippet to covert data table to HTML. It will take the data table as input and returns string with html and use this string in the mail body. Select IsBodyHtml in the mail property.
image

DataTable_To_HTML.xaml (9.8 KB)

@Mythras

You can use create html content activity…and you have an option to add your datatable directly and it would format as a table…

https://docs.uipath.com/activities/docs/create-html-content

Please try and let us know if you face any issues

Cheers