# Html Table

**URL:** <https://forum.uipath.com/t/html-table/2790028>\
**Category:** Help\
**Tags:** question, citrix, activities\
**Created:** [April 17, 2025, 8:03am UTC](https://forum.uipath.com/t/html-table/2790028 "2025-04-17T08:03:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Honda](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/honda/32/512789_2.png) [@Honda](https://forum.uipath.com/u/Honda)\
**Post date:** [April 17, 2025, 8:03am UTC](https://forum.uipath.com/t/html-table/2790028/1 "2025-04-17T08:03:39Z")

</div>

Team,

I want to create a HTML table in below format. Please help in sharing sample code

 ![image](https://global.discourse-cdn.com/uipath/original/4X/e/4/f/e4f845ed85f85821f9dedfcd08a6e1adc480e885.png)

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [April 17, 2025, 8:30am UTC](https://forum.uipath.com/t/html-table/2790028/2 "2025-04-17T08:30:56Z")

</div>

Hi @Honda ,  
Use below logic to build the html table

```auto
htmlTable = "<table border='1'><tr><th>Col1</th><th>Col2</th><th>Col3</th><th>Col4</th><th>Col5</th><th>Col6</th><th>Status</th></tr>"

For Each row In yourDataTable.Rows
    htmlTable &= "<tr>"
    For Each item In row.ItemArray
        htmlTable &= "<td>" & item.ToString & "</td>"
    Next
    htmlTable &= "</tr>"
Next

htmlTable &= "</table>"

```

Regards,  
Arivu

---

<div class="post-metadata">

**Author:** ![Honda](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/honda/32/512789_2.png) [@Honda](https://forum.uipath.com/u/Honda)\
**Post date:** [April 17, 2025, 8:43am UTC](https://forum.uipath.com/t/html-table/2790028/3 "2025-04-17T08:43:01Z")

</div>

> [@arivu96](#):
>
> ```auto
> <table border='1'><tr><th>Col1</th><th>Col2</th><th>Col3</th><th>Col4</th><th>Col5</th><th>Col6</th><th>Status</th></tr>"
> 
> ```

Thanks for your response. I am not going to use it inside the code. This is just an static email template. Pls share the full html code based on the format mentioned.

---

<div class="post-metadata">

**Author:** ![lrtetala](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@lrtetala](https://forum.uipath.com/u/lrtetala)\
**Post date:** [April 17, 2025, 1:01pm UTC](https://forum.uipath.com/t/html-table/2790028/4 "2025-04-17T13:01:34Z")

</div>

Hi @Honda

Can you try with **Create HTML Content** activity

> [@Copiar tabla de excel en cuerpo de gmail](https://forum.uipath.com/t/copiar-tabla-de-excel-en-cuerpo-de-gmail/2773923/3):
>
> @mively Regards,

Regards,

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [April 17, 2025, 1:02pm UTC](https://forum.uipath.com/t/html-table/2790028/5 "2025-04-17T13:02:57Z")

</div>

@Honda

use create html content add the datatable in it and then the output string would be the required html

cheers
