BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to determine Excel version?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
M.E.
Guest





PostPosted: Thu Jul 20, 2006 6:02 am    Post subject: How to determine Excel version? Reply with quote



I've discovered that even using the portuguese version of Excel 2003 I must
insert the functions in English at design time.
So I have to write '=SUM(B2:M2)' to get '=SOMA(B2:M2)' written at the cell.
Nevertheless, that does not work with the portuguese version of Excel 97.
With it, "SUM" is not understood and turns into "#NOME?" (I'm testing my
application on different computers).
Is there a way to determine which version of Excel is being called by the
automation routine, so I might programatically write "SUM" or "SOMA"?
Thanks,
Marcio
Back to top
Oliver Townshend
Guest





PostPosted: Thu Jul 20, 2006 6:26 am    Post subject: Re: How to determine Excel version? Reply with quote



Quote:
I've discovered that even using the portuguese version of Excel 2003 I
must
insert the functions in English at design time.
So I have to write '=SUM(B2:M2)' to get '=SOMA(B2:M2)' written at the
cell.
Nevertheless, that does not work with the portuguese version of Excel 97.
With it, "SUM" is not understood and turns into "#NOME?" (I'm testing my
application on different computers).

What type library are you using? The 97 one?

Oliver Townshend
Back to top
Marc Rohloff [TeamB]
Guest





PostPosted: Thu Jul 20, 2006 6:51 am    Post subject: Re: How to determine Excel version? Reply with quote



On Wed, 19 Jul 2006 22:02:02 -0300, M.E. wrote:

Quote:
Is there a way to determine which version of Excel is being called by the
automation routine, so I might programatically write "SUM" or "SOMA"?

Check the Version property of the Excel Application object.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Back to top
M.E.
Guest





PostPosted: Thu Jul 20, 2006 7:11 am    Post subject: Re: How to determine Excel version? Reply with quote

You are right. Excel97 is at the Uses. There should be another? Where can I
get it?
Marcio


"Oliver Townshend" <oliveratzipdotcomdotau> escreveu na mensagem
> What type library are you using? The 97 one?
Back to top
M.E.
Guest





PostPosted: Thu Jul 20, 2006 7:27 am    Post subject: Re: How to determine Excel version? Reply with quote

Great!!
After your hint, I googled and found this list:
Excel 95 = Version 7.0
Excel 97 = Version 8.0
Excel 2000 = Version 9.0
Excel 2002 = Version 10.0
Excel 2003 = Version 11.0
[]s,
Marcio

"Marc Rohloff [TeamB]" <"on request"> escreveu na mensagem
> Check the Version property of the Excel Application object.
Back to top
Oliver Townshend
Guest





PostPosted: Thu Jul 20, 2006 7:52 am    Post subject: Re: How to determine Excel version? Reply with quote

Quote:
You are right. Excel97 is at the Uses. There should be another? Where can
I
get it?

You can import the Excel 2003 type library. The problem is then that you
will have to have two separate applications. Using Excel97 works with 2003,
but not vice-versa.

Oliver Townshend
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.