# Datatable in mail

**URL:** <https://forum.uipath.com/t/datatable-in-mail/163299>\
**Category:** Help\
**Tags:** studio, mail, activities\
**Created:** [October 29, 2019, 9:42am UTC](https://forum.uipath.com/t/datatable-in-mail/163299 "2019-10-29T09:42:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sweety\_Girl](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sweety_girl/32/63415_2.png) [@Sweety\_Girl](https://forum.uipath.com/u/Sweety_Girl)\
**Post date:** [October 29, 2019, 9:42am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/1 "2019-10-29T09:42:11Z")

</div>

How to display the datatable in mail body

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [October 29, 2019, 9:47am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/2 "2019-10-29T09:47:35Z")

</div>

@Sweety_Girl

Use **Output DataTable** activity and convert that DataTable into string and pass that string into mail body to write into it.

---

<div class="post-metadata">

**Author:** ![Sweety\_Girl](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sweety_girl/32/63415_2.png) [@Sweety\_Girl](https://forum.uipath.com/u/Sweety_Girl)\
**Post date:** [October 29, 2019, 9:48am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/3 "2019-10-29T09:48:28Z")

</div>

Will it look like table with data in it

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [October 29, 2019, 9:50am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/4 "2019-10-29T09:50:01Z")

</div>

@Sweety_Girl

Yes it will look like table but it is without table borders.

---

<div class="post-metadata">

**Author:** ![Sweety\_Girl](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sweety_girl/32/63415_2.png) [@Sweety\_Girl](https://forum.uipath.com/u/Sweety_Girl)\
**Post date:** [October 29, 2019, 9:50am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/5 "2019-10-29T09:50:20Z")

</div>

I need it with border

---

<div class="post-metadata">

**Author:** ![sarathi125](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sarathi125/32/519448_2.png) [@sarathi125](https://forum.uipath.com/u/sarathi125)\
**Post date:** [October 29, 2019, 9:51am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/6 "2019-10-29T09:51:01Z")

</div>

@Sweety_Girl,

You need to format a string with html table tags with your datatable data, then by enabling IsBodyHtml as true in the mail, you can send the mail with Html table format as a html email message.

[https://go.uipath.com/component/datatable-to-html-conversion](https://go.uipath.com/component/datatable-to-html-conversion)

check this link to convert the datatable to html table.

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [October 29, 2019, 9:53am UTC](https://forum.uipath.com/t/datatable-in-mail/163299/7 "2019-10-29T09:53:09Z")

</div>

@Sweety_Girl

Please check below thread.

> [@How to write the contents of excel into email message body without loosing table formats](https://forum.uipath.com/t/how-to-write-the-contents-of-excel-into-email-message-body-without-loosing-table-formats/19989/21):
>
> @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]
