I have one excel which consist of Requestor name. I want to create html table for requestor name which consist ISIN and services.
But for duplicate requestor only 1 html table should get created with multiple ISIN and services against that requestor. Attaching the excel. Testing List for BOT 23.02.2026.xlsx (10.1 KB)
You can achieve this by grouping the DataTable by the Requestor column and then generating one HTML table per Requestor.
Example:
Dim groups = dtData.AsEnumerable().GroupBy(Function(r) r("Requestor").ToString)
For Each g In groups
html &= "<h3>" & g.Key & "</h3><table border='1'>"
html &= "<tr><th>ISIN</th><th>Services</th></tr>"
For Each row In g
html &= "<tr><td>" & row("ISIN").ToString & "</td>"
html &= "<td>" & row("Services").ToString & "</td></tr>"
Next
html &= "</table><br/>"
Next
This will create one HTML table per Requestor, and if a Requestor has multiple rows (ISIN & Services), they will appear as multiple rows in the same table dynamically.
If Solution help you please mark as Solution ,
Thanks & Happy Automation with UiPath
Got it — you don’t need grouping here. You just want one single table with one header, and all rows (even for different requestors) listed under it.
So instead of GroupBy, just loop through the DataTable directly and build one table:
html = "<table border='1'>"
html &= "<tr><th>Requestors</th><th>Client</th><th>ISIN</th><th>Asset</th><th>Services</th></tr>"
For Each row In dtData.AsEnumerable()
html &= "<tr>"
html &= "<td>" & row("Requestors").ToString & "</td>"
html &= "<td>" & row("Client").ToString & "</td>"
html &= "<td>" & row("ISIN").ToString & "</td>"
html &= "<td>" & row("Asset").ToString & "</td>"
html &= "<td>" & row("Services").ToString & "</td>"
html &= "</tr>"
Next
html &= "</table>"
This will give you exactly what you’re looking for
single header
all rows combined
no split by requestor
The earlier approach was grouping (multiple tables), but your requirement is just a flat table.
Hi again
If what @chinthakayala_karthik is what you meant, then I updated the code in the repository I linked to and the solution is called SingleHeader Solution. It looks like this: