Hi,
I am using office xp, in my code i am referencing excel 10 library.
When I am trying to open application i have following exception: "Old
format or invalid type library". Please help.
using Excel = Microsoft.Office.Interop.Excel;
/
/
/
/
Excel.Application xlapp = new Excel.ApplicationClass();
Excel.Workbook xlworkbook;
Excel.Worksheet xlworksheet;
String xls = "file path";
xlapp.Visible = true;
xlworkbook = xlapp.Workbooks.Open(xls,Missing.Value,Missing.Val ue,Missing.Value,Missing.Value,Missing.Value,
Missing.Value,Missing.Value,Missing.Value,Missing. Value,Missing.Value,
Missing.Value,Missing.Value,Missing.Value,Missing. Value);
xlworksheet = (Excel.Worksheet) xlworkbook.Worksheets.get_Item(1);
What is wrong?