export DataGridView to excel 2007 in c#
-
hi Microsoft.Office.Interop.Excel.ApplicationClass ExcelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); // in this line of code: ExcelApp.Application.Workbooks.Add(Type.Missing); error: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) can any one help me ?
H.R
-
hi Microsoft.Office.Interop.Excel.ApplicationClass ExcelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); // in this line of code: ExcelApp.Application.Workbooks.Add(Type.Missing); error: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) can any one help me ?
H.R
1. You can export datatable that you use to bind your datagridview through OleDb into Excel file. There won't be any need of interop. 2. Did you googled the error message? 3. What are trying to do in that line of code?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!