Export Datagridview to Excel in VS 2012 DataSet ds=new DataSet(); ds=LoadData(qry); // creating Excel Application Microsoft.Office.Interop.Excel._Application app = new Microsoft.Office.Interop.Excel.Application(); // creating new WorkBook within Excel application Microsoft.Office.Interop.Excel._Workbook workbook...
Friday, 2 October 2015
VS 2008 Exporting Datagrid to Excel
-
Posted by: Unknown
Unknown
- 2 October ||
- No Comments
Befor that add Microsoft.Office.Interop.Excel dll in reference if (dataGridView1.Rows.Count > 0) { Microsoft.Office.Interop.Excel.ApplicationClass XcelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); XcelApp.Application.Workbooks.Add(Type.Missing); ...