# Insert datatable to html string

**URL:** <https://forum.uipath.com/t/insert-datatable-to-html-string/508564>\
**Category:** Studio\
**Tags:** string, html, question, studio, system, activities\
**Created:** [January 18, 2023, 11:57am UTC](https://forum.uipath.com/t/insert-datatable-to-html-string/508564 "2023-01-18T11:57:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagaabhishekreddy.c](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nagaabhishekreddy.c/32/264554_2.png) [@nagaabhishekreddy.c](https://forum.uipath.com/u/nagaabhishekreddy.c)\
**Post date:** [January 18, 2023, 11:57am UTC](https://forum.uipath.com/t/insert-datatable-to-html-string/508564/1 "2023-01-18T11:57:18Z")

</div>

Hi all,  
i have an html templete where i have to insert a datatable, the html is shared below

[htmlcode.txt](https://forum.uipath.com/uploads/short-url/glGwAtVYzxXtgr4t7d0YZNU3nd6.txt) (1.1 KB)

can anyone tell me how to insert the datatable?

---

<div class="post-metadata">

**Author:** ![Kalpesh\_Chaudhari](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kalpesh_chaudhari/32/241531_2.png) [@Kalpesh\_Chaudhari](https://forum.uipath.com/u/Kalpesh_Chaudhari)\
**Post date:** [January 18, 2023, 12:08pm UTC](https://forum.uipath.com/t/insert-datatable-to-html-string/508564/2 "2023-01-18T12:08:02Z")

</div>

Install UiPath.Mail.Activities package and use ‘Create HTML Content’ activity. Pass data table variable to make it dynamic.

other content from text file need to be there in Create HTML Content as text.

---

<div class="post-metadata">

**Author:** ![nagaabhishekreddy.c](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nagaabhishekreddy.c/32/264554_2.png) [@nagaabhishekreddy.c](https://forum.uipath.com/u/nagaabhishekreddy.c)\
**Post date:** [January 18, 2023, 12:09pm UTC](https://forum.uipath.com/t/insert-datatable-to-html-string/508564/3 "2023-01-18T12:09:02Z")

</div>

but i want the table to be in the above mentioned html file

---

<div class="post-metadata">

**Author:** ![Kalpesh\_Chaudhari](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kalpesh_chaudhari/32/241531_2.png) [@Kalpesh\_Chaudhari](https://forum.uipath.com/u/Kalpesh_Chaudhari)\
**Post date:** [January 18, 2023, 12:18pm UTC](https://forum.uipath.com/t/insert-datatable-to-html-string/508564/4 "2023-01-18T12:18:08Z")

</div>

do you need table to be inserted in the HTML formt?

if yes, then the same activity will produce HTML string and you can use that variable to write back to notepad.
