Discussion:
howto open a file excel 2002 with c# and office 2007 libraries?
(too old to reply)
spile
2007-11-13 17:55:03 UTC
Permalink
Hi,
when i try to print through c# and Office 2007 library
"Microsoft.Office.Interop.Excel" a xls created with an older version of
program (for example excel 2002-2003), the system raise the following error:
{"Old format or invalid type library. (Exception from HRESULT: 0x80028018
(TYPE_E_INVDATAREAD))"}

Can i reference more libraries that have the same namespace name?
or How can to do it?

thks
Maximo
unknown
2007-11-19 00:20:38 UTC
Permalink
Hi Maximo,

You may want to also post this question through the link below in the Excel Programming discussion group.

==========
<<"spile" <***@discussions.microsoft.com> wrote in message news:E783048E-4271-45A8-9866-***@microsoft.com...
Hi,
when i try to print through c# and Office 2007 library
"Microsoft.Office.Interop.Excel" a xls created with an older version of
program (for example excel 2002-2003), the system raise the following error:
{"Old format or invalid type library. (Exception from HRESULT: 0x80028018
(TYPE_E_INVDATAREAD))"}

Can i reference more libraries that have the same namespace name?
or How can to do it?>>
--
Please let us know if this has helped,

Bob Buckland ?:-)
MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends<<
LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.excel.programming
or via browser:
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.excel.programming

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com



thks
Maximo
j***@gmail.com
2013-12-12 10:08:41 UTC
Permalink
Post by spile
Hi,
when i try to print through c# and Office 2007 library
"Microsoft.Office.Interop.Excel" a xls created with an older version of
{"Old format or invalid type library. (Exception from HRESULT: 0x80028018
(TYPE_E_INVDATAREAD))"}
Can i reference more libraries that have the same namespace name?
or How can to do it?
thks
Maximo
I would recommend you to try Aspose.Cells for .NET Library for opening excel files in c#. You can get sample codes from their documentation page and many more code sample that you can use in your API. Below is the link of this library. Best of luck.

http://www.aspose.com/.net/excel-component.aspx

Loading...