F
Franco Vitali
I developed a WinForm application wich takes some
information from a database and I want to write some data
to an .XLS document. When I execute the code it throws an
exception:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in Excel Test 01.exe
Additional information: Old format or invalid type
library.
My Code:
Microsoft.Office.Interop.Excel.Application ap = new
Microsoft.Office.Interop.Excel.ApplicationClass();
Microsoft.Office.Interop.Excel.Workbook wb =
ap.Workbooks.Add(Type.Missing);
ap.Workbooks.Close();
I need to know how can I start the Application class
properly. Thanks.
information from a database and I want to write some data
to an .XLS document. When I execute the code it throws an
exception:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in Excel Test 01.exe
Additional information: Old format or invalid type
library.
My Code:
Microsoft.Office.Interop.Excel.Application ap = new
Microsoft.Office.Interop.Excel.ApplicationClass();
Microsoft.Office.Interop.Excel.Workbook wb =
ap.Workbooks.Add(Type.Missing);
ap.Workbooks.Close();
I need to know how can I start the Application class
properly. Thanks.