ThienZ Posted March 16, 2005 Posted March 16, 2005 hi, this might be a dumb question.... but i can't 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 : 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); 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 :) Quote
ThienZ Posted March 16, 2005 Author Posted March 16, 2005 i found the source of the problem. The Problem is that i have a german version of windows and english version of office. I read a microsoft's site about this problem and it says if the local settings' language and the office language aren't the same, excel will try to locate a suitable MUI. if excel doesn't find it, it will throw this exception... Quote
Recommended Posts