Changing Excel Version for Automation on the fly?

S

sidefxboy

Hi folks,

I'm wondering if someone could offer some suggestions for something.
I have some classes in .NET that can operate on Excel objects going
back to excel 97. In my unit testing I want to change the version that
gets created by CreateObject("Excel.Application") on the fly - so that
I can automatically run all tests using the excel8 object model, then
the excel10, then excel11, etc.

Can anybody suggest some way that this may be possible. Or any other
groups that I could ask in.

It looks like it may be possible through a bit of a hack - by
modifying the registry directly and changing HKEY_CLASSES_ROOT\CLSID
\{00024500-0000-0000-C000-000000000046}\LocalServer32 but I wonder if
there is an easier way.

The following has a bit more information about what I speak of above,
if it helps:

http://support.microsoft.com/kb/292491

But nothing that helps me

thanks,
Simon
 
C

Cindy M.

I'm wondering if someone could offer some suggestions for something.
I have some classes in .NET that can operate on Excel objects going
back to excel 97. In my unit testing I want to change the version that
gets created by CreateObject("Excel.Application") on the fly - so that
I can automatically run all tests using the excel8 object model, then
the excel10, then excel11, etc.
You could *try* something like CreateObject("Excel.Application.8"). But
if you're linking to a specific set of PIAs this might not work very
well.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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