G
Guest
Hi,
I'm using C# and creating a wrapper class for Excel. On my laptop, I have Office 2000 installed and on my "normal" computer, I use Office 2002 (XP).
Now, the Workbooks.Open method takes a different number of parameters in both versions. In XL2000, it takes 1 necessary parameter and 12 optionnal ones (13 in all) while XL2002 takes 1 necessary parameter and 14 optionnal ones (15 in all).
Since, in C#, you cannot not specify an optionnal parameter and must use 'Missing.Value' instead, I'm kinda stuck. Of course, I'd like to write some code that will successfully compile AND run under both circumstances. Is that possible?
Any suggestions are welcomed.
SC
I'm using C# and creating a wrapper class for Excel. On my laptop, I have Office 2000 installed and on my "normal" computer, I use Office 2002 (XP).
Now, the Workbooks.Open method takes a different number of parameters in both versions. In XL2000, it takes 1 necessary parameter and 12 optionnal ones (13 in all) while XL2002 takes 1 necessary parameter and 14 optionnal ones (15 in all).
Since, in C#, you cannot not specify an optionnal parameter and must use 'Missing.Value' instead, I'm kinda stuck. Of course, I'd like to write some code that will successfully compile AND run under both circumstances. Is that possible?
Any suggestions are welcomed.
SC