How to send pivot table in email body

Hi Everyone,

Today’s my query is how we send pivot table in email body of outlook.

please help me out.

make it as html table as string pass to body of the mail.

<html>
<style>
table, th, td {
  border:1px solid black;
}
</style>
<body>

<h2>body of the mail</h2>
<p>body of the email.</p>
<table style="width:100%">
  <tr>
    <th>Company</th>   
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>  
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>   
    <td>Mexico</td>
  </tr>
</table>



</body>
</html>

Regards,
Arivu

hi @Lakshya_Garg2

You can try this market place activity

This will be stored in a string and you can add the string in the body of the mail or you can try with create HTML content

Regards
Sudharsan

I just implemented this LINQ to a process earlier today. It works perfectly.

(From row In dt_Table.AsEnumerable
Group row By Key= New With{
Key.Region= row.item(“Region”),
Key.Rep= row.item(“Rep”),
Key.Item= row.item(“Item”)
}Into grp= Group
Select dt_Result.LoadDataRow(New Object(){
Key.Region,
Key.Rep,
Key.Item,
grp.Count()
},True)).OrderBy(Function(row) row.item(“Region”)).ThenBy(Function(row) row.item(“Rep”)).ThenBy(Function(row) row.item(“Item”)).CopyToDataTable

hi,
can u create above code for me.
please help.

here is the file which have input as well as output.
Pending-Report (1).xlsx (15.9 KB)