hi,
this might be a dumb question.... but i cant open a workbook from c#...
i have already insert the COM reference into the project, it was the MS Excel 11.0 Object Library, TypeLib-Version 1.5.
my code looks like this :
it says : "Old Format or Invalid Type Library" on the Workbooks.Open part....
if i write Excel.Application oApp = new Excel. and press ctrl+space i could select _Application too, but it is an interface.... and there is no Application too...
Any suggestions to get it right? thx
this might be a dumb question.... but i cant open a workbook from c#...
i have already insert the COM reference into the project, it was the MS Excel 11.0 Object Library, TypeLib-Version 1.5.
my code looks like this :
C#:
object oMissing = Type.Missing;
Excel.Application oApp = new Excel.ApplicationClass();
Excel.Workbook oWB;
Excel.Worksheet oWS;
oWB = oApp.Workbooks.Open(@"myxlfile.xls",
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
if i write Excel.Application oApp = new Excel. and press ctrl+space i could select _Application too, but it is an interface.... and there is no Application too...
Any suggestions to get it right? thx
