Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use of Excel APIs for multiple versions of Excel

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Use of Excel APIs for multiple versions of Excel

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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Use of Excel APIs for multiple versions of Excel

There does not seem to be an "easy" solution since somehow your code will
need to account for any of the changes, and without some sort of specialized
tool that can only be done by writing code to deal with any differences. I
can only suggest that you could create a custom class (not sure the proper C#
terminology?) including the Excel API within the class - then pass a
"generic" set of arguments to your new "versionless" Excel object that you
can modify (according to version) and pass to the actual API. Makes it
easier to use down the road, but it would be a lot of up-front work (which is
why people can sell this type of thing as a 3rd party product!)

"Ronnie Thompson" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Language Versions of Excel [email protected] Excel Discussion (Misc queries) 1 August 7th 06 07:23 PM
How to you open multiple versions of Excel buriedinit Excel Discussion (Misc queries) 1 June 21st 06 06:19 AM
Multiple Excel versions. Naveen Mukkelli Excel Discussion (Misc queries) 0 May 16th 06 12:55 AM
VB6 COM Add-In for multiple Excel and Word versions Yossi[_2_] Excel Programming 1 November 6th 04 08:11 PM
VB6 COM Add-In for multiple Excel and Word versions Yossi[_3_] Excel Programming 0 November 3rd 04 08:09 PM


All times are GMT +1. The time now is 12:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"