المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem with reading excel 2007.



C# Programming
06-30-2009, 03:11 AM
Hi
i use this article to reading excel 2007 via c# :
Loading and reading the Microsoft Excel file contents using C# (http://www.codeproject.com/KB/cs/Excel_Application_in_C_.aspx)[^ (http://www.codeproject.com/KB/cs/Excel_Application_in_C_.aspx)]

but the following error display me :
Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))

this error ocuured in this line :
Workbook workbook = app.Workbooks.Open(path,
0,
true,
5,
"",
"",
true,
XlPlatform.xlWindows,
"\t",
false,
false,
0,
true,
1,
0);

how to solve this problem ?
thanks