Excel libraries in VB.NET

A

Alan

Does anyone know the difference between the Excel 5 library and Excel
11.0 Object Library?

I am using Visual Studio 2008 and cannot find a listing (under
COM libraries) for 11.0.

Thanks, Alan
 
J

joel

The libraries are not really much different. The libraries are mostl
wrappers which call the DLLs in Windos. The DLL's are located in tw
locations

1) Windows/system32
2) Program Files ...\Office11 (or the version of office installe
on you PC).

I don't know if excel 5 is refering to the VB-5 or Office 95.

Office 2000 and up are pretty similar just some enhancements. Offic
97 was significantly different.

If it is refering to Office product then I think this is what
remember
5.0 is Office 1995
7.0 is Office 1997
8.0 is Office 1998 - not sure if this ever existed
9.0 is Office 2000
10.0 is Office 2002
11.0 is Office 2003
12.0 is Office 200
 
P

Peter T

5 : Excel 5 (in 1993)
7 : Excel 95
8 : '97
9 : 2000
10 : 2002
11 : 2003
12 : 2007
14 : 2010

Office 1998 was for Mac, although there was Outlook 98 for PC

AFAIK VB.Net will not work with Excel 5

Regards,
Peter T
 
A

Alan

That`s sort of what I thought.. ...

Questions:

1. What is the easiest way to find the Excel 11.0 Object Library on my
hard disk, if it exists?

2. If it`s not there, do you know if I can find it someplace and
download it?

Thanks, Alan
 
A

Alan

I think the IDE or Office may be forcing use of the 2007 (12.0) object
library, and I think perhaps I need to modify the "binding redirect
policy," but I cannot find an authorirative reference on this.

Can anyone point me in the right direction?

Alan
 
P

Peter T

OK I understand your problem now. You will need to have Excel 2003
installed, if you have an MSDN subscription you can get it there, otherwise
I imagine it can be bought quite cheaply

You can develop in the 2007 machine, take your project to a system with 2003
and compile on that. Not ideal though. If you need to cater for both 2003 &
2007 you will find it easier to have both versions installed on your system.
Maybe you can install 2003 into a new VM. Otherwise you must install
versions in oldest first order. So uninstall 2007 before installing 2003,
then reinstall 2003. (tip - choose separate folders rather than the
default).

Regards,
Peter T
 
A

Alan

Peter,

Could you please explain your statement: "Maybe you can install 2003
into a new VM"?

Thanks for the info. I was afraid of that.

I cannot afford an MSDN subscription, but I`ll look into buying Excel
2003.

Thanks, Alan
 
A

Alan

Peter,

I found a PC with Excel 2003 installed. The Excel 11.0 Object Library
is listed under COM References in VB 2008 Express. However, when I
select it, it says it cannot find the file. I checked under Windows
\Assembly\... and found no assembly/dll for it there.

Do you think this might be fixed by downloading the .NET
redistributable framework, or is this more likely a problem with the
Excel installation?

Thanks, Alan
 
P

Peter T

Sounds like the Excel 11.0 Object Library is definitely there, well it must
be otherwise Excel 2003 wouldn't work. And assuming Excel does work the
problem is nothing to do with installing the .Net update.

Maybe the project is trying to find Excel.exe in the path where it existed
in the Excel 2007 machine.

Regards,
Peter T
 
A

Alan

No, this is a completely different PC, which has never had 2007 on it.

Any ideas on what I could try?

Thanks, Alan
 
P

Peter T

That wasn't what I meant.

Are you having problems to find Excel starting .Net as a brand new project,
or with the project originally made in the 2007 machine and copied to the
2003 machine.

If the former I don't know why you can't find the Excel library, if the
latter it's probably down to what I mentioned last time.

Regards,
Peter T
 
P

Peter T

Can you browse to excel.exe to set the ref, apart from that I'm out of
ideas.

Regards,
Peter T
 
J

joel

I don't think you need to even worry. Using the latest version of th
library on the PC with the compiler and check to make sure the code run
on both a 2003 and 2007 machine.

All you really need to do is after creating the Excel object save th
file using SAVEAS and save the file as an XLS extension. Also make sur
you don't use any features that aren't supported in 2003.


The application/library isn't the important issue it is the saved fil
structure. If you open an XLS file in 2003 and 2007 the exce
application will look different, but the data will be the same and al
the feature will work because excel 2007 is intenend to be upwar
compatibile with excel 2003. Both 2003 and 2007 will read the same XL
file which will make you code run on both type of PC's
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top