Hello Everyone,
Most of Developers working around the world faces a scenario where they need to export the data from database to Excel. So today, i will show you how to export the data into excel in C#.
These are easy steps to export and display the data into custom design to excel using C#.
Here are the easy steps,
1. Open the Visual Studio and Create new Website/Web Application
2. Here I've added a button (Export) on my Default.aspx page,
3. In the code behind, Add the required namespace,
4. Create a object of class StringBuilder as shown below,
5. Add the below source code for Button click event,
6. Create content to display in an excel,
7. Run the Application, you will find the below mentioned output,
Please post your comments and Queries if you have any queries in SQL Server.
You can find more blogs on our website: Trigya Technologies
No comments:
Post a Comment