Add-in for multiple versions of Excel

A

Alan Moseley

Hi there. I hope that someone can point me in the right general direction.
I have created a Shared Add-In for Excel (not VSTO) using Excel 2003 and
Visual Studio 2005. In addition, I have an xla which exposes a custom
function to Excel, and links back to my shared add-in to perform the function
for me. This works just great. I have created a setup package to distribute
it. In doing so I discovered that I needed to use tlbexp to create a tlb
file for my dll, and regasm after installation on the machine being deployed
on. This all works just fine.

However, I have been asked to make this usable on Excel 2000. Reading up on
this Microsoft suggests installing Excel 2000 on my development machine and
referencing the Excel 2000 objects instead of 2003. These should then be
forward compatible. Having done this, I regenerated my tlb file and updated
my setup package. The setup now works on Excel 2000. However, when I run the
setup on an Excel 2003 machine, the regasm process now fails as the Excel
2000 library is not available.

Does anyone have any suggestions as to how I might get around this? Is my
deployment approach correct? Should I be making my custom function available
in some other way that the xla file? I have heard that rather than
referencing the Excel libraries I can use late-binding. How can can I add a
handler to an object which is created via this method? I must be missing
something. Any help would be greatly appreciated.
 
D

David Thielen

We build 4 versions of our AddIn, one for each version of Office
2000/2002/2003/2007. To do this we create 4 projects in VS 2005 but in
3 of the projects all the files are added as links, not a direct open.

Each one has it's version of the Office PIAs as references so it links
to the one for that version. In addition, we ship with the PIAs (they
are redistributable so you can do this) and install the PIAs in the
GAC if they are not there. If you do this, then an earlier version
will run on a later version of Office (although that is not
recomended).

good luck - dave


Hi there. I hope that someone can point me in the right general direction.
I have created a Shared Add-In for Excel (not VSTO) using Excel 2003 and
Visual Studio 2005. In addition, I have an xla which exposes a custom
function to Excel, and links back to my shared add-in to perform the function
for me. This works just great. I have created a setup package to distribute
it. In doing so I discovered that I needed to use tlbexp to create a tlb
file for my dll, and regasm after installation on the machine being deployed
on. This all works just fine.

However, I have been asked to make this usable on Excel 2000. Reading up on
this Microsoft suggests installing Excel 2000 on my development machine and
referencing the Excel 2000 objects instead of 2003. These should then be
forward compatible. Having done this, I regenerated my tlb file and updated
my setup package. The setup now works on Excel 2000. However, when I run the
setup on an Excel 2003 machine, the regasm process now fails as the Excel
2000 library is not available.

Does anyone have any suggestions as to how I might get around this? Is my
deployment approach correct? Should I be making my custom function available
in some other way that the xla file? I have heard that rather than
referencing the Excel libraries I can use late-binding. How can can I add a
handler to an object which is created via this method? I must be missing
something. Any help would be greatly appreciated.


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

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