Hi @Shiv Sharma ,
This requirement need to use SQL DataTable to achieve instead of Excel .
As in Excel, it's hard to build a html datatable with query result and then send email.
With SQL Datatable, it will easy to query result and build the html table dynamaically.
Here are some demos to send email with data query html table from SQL Server for your reference:
Sending HTML tables in mail from SQL Server
Sending table form HTML emails from a SQL Server database engine
Thanks
Best Regards
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.