title: How to export data from SQL Server table to Excel file
body: <p>I have a table in a SQL Server database. I want to send the Excel sheet via Email attachment. I have a code to send the mail but i need to generate an excel sheet of a given table.</p>