Here is the solution for converting DataTable variable into HTML table.
By this you can avoid adding new dependencies to your project or implementing long workflows to get data in HTML table format.
Create a String variable (HTMLBodyStr) and assign below expression to it. Replace TestDT variable with your Datatable Variable
HTMLBodyStr="<table border=2><tr><td>"+String.Join("</td><td>",TestDt.Columns.Cast(Of DataColumn).Select(Function (x) x.ColumnName).ToArray)+"</td></tr>"+
"<tr>"+String.Join("</tr><tr>",(From x In TestDt.AsEnumerable
Let cells="<td>"+String.Join("</td><td>",x.ItemArray)+"</td>"
Select cells).ToArray)+"</tr>"
Glad to know that it is useful to you
You could try below expression to get what you wanted to.
HTMLBodyStr="<table border=2><b><tr><td>"+String.Join("</td><td>",TestDt.Columns.Cast(Of DataColumn).Select(Function (x) x.ColumnName).ToArray)+"</td></tr></b>"+
"<tr>"+String.Join("</tr><tr>",(From x In TestDt.AsEnumerable
Let cells="<td>"+String.Join("</td><td>",x.ItemArray)+"</td>"
Select cells).ToArray)+"</tr>"
It is a bit difficult to understand your requirements with the above message. Could you briefly explain maybe with examples? (like input data and expected output)