Download Records In Excel File ASP.NET C#

Share:

DataTable To XLS File


We have created a DataTable with some dummy records.
On page load we have binded with Gridview as shown in image below.

There is a button to download the data.

On the button event we have created a logic to download the data from DataTable to XLS file.

Dummy Records:


Default.aspx  

Default.aspx.cs

Hi! I am Sartaj Husain. I am a Professional Software Developer, live in Delhi. I write blogs in my free time. I love to learn and share the knowledge with others because it is no good to try to stop knowledge from going forward. So free posts and tutorials. more..

No comments