Question: how to export data from datagridview to excel in c#.net windows application?
Answer: When you click Export To Excel button, the application will export DataGridView data to an Excel document. The Excel document will look like Figure 2. Before you write code, you must add a reference to the Microsoft Excel object library. Right click on your project and select Add Reference menu.