Html table creation for unique entries

Hi ,

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)

Hi @sshitol
Please try this approach

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

Hi

I made a small projekt you can use to try it out. Find it here: UiPath-Forum-Examples/Html table creation at main · AutomationGems/UiPath-Forum-Examples · GitHub

When I run it it looks like this:

Is this a duplicate post of this: Html table creation - #5 by MrBidstrup

i want all rows combined in one header..
in your output for different requestor rows are different but that should get combine into single table

Hi @sshitol
I’m not sure I understand what it is you’re after. Could you try to elaborate og make an example in excel or something?

Hi @sshitol ,

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.

Generated the code block with GPT.

Thanks,
Karthik

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:

I sorted the datatable by the column Requestor to make sure they where placed together.

Hope this helps.