Question: how to export data from gridview to excel in c# windows application?
Answer: Right click on your project and select Add Reference menu. After that go to COM tab and select and add Microsoft Excel 12.0 object library. Now here is my Button click event handler where I create Excel object and document, get data from DataGridView and add rows and columns to the document. app.