View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default Use of Excel APIs for multiple versions of Excel


If I recall correctly, C# doesn't support optional arguments the same
way VB does. When you call a method you have to pass all the arguments,
optional or otherwise (there's some kind of special empty value you pass
when you aren't going to use the optional argument). So, for example, when
they added a ton of optional arguments to the Worksheet.Protect method
between Excel 2000 and 2002 it looks the same from VB but completely
different from C#. No idea what the solution is though.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Jim Rech" wrote in message
...
I'm not sure what you mean by an "API". Can you give us an example of one
you feel has changed?

--
Jim Rech
Excel MVP
"Ronnie Thompson" wrote in
message ...
|I am working on a C# application that generates Excel spreadsheets using
| Excel APIs. My scope includes support of Excel 2000 and greater (Excel
2002,
| Excel 2003) etc. Unfortunately, the required parameters for each API
have
| changed with the different versions of Excel. For example, my program
works
| fine with Excel 2000, but does not work with Excel 2002 or Excel 2003
because
| the APIs have changed.
|
| What is the best strategy to use so I can write the application as
simple
as
| possible, but at the same time support the various versions of Excel
that
are
| available including yet to be released versions?
|
| I know there are third party tools available, however I do not want to
| increase the license cost of the product and require third party
software
| licenses when the user of my application already has Excel.