| View previous topic :: View next topic |
| Author |
Message |
slycaper Guest
|
Posted: Tue Sep 19, 2006 9:31 pm Post subject: Using Excel XP instead of Excel 2000 in D2006 |
|
|
Hello,
It appears Excel XP has chagned at least a couple of interface methods
since Excel 2000. "Find" (as in _WorkSheet.Cells.Find)is one of those
such methods. My application now wraps the Excel XP interface however I
still want to remain compatible with Excel 2000.
The "Find" wrapper from Excel XP is like so:
function Find(What: OleVariant; After: OleVariant; LookIn: OleVariant;
LookAt: OleVariant; SearchOrder: OleVariant; SearchDirection:
XlSearchDirection; MatchCase: OleVariant; MatchByte: OleVariant;
SearchFormat: OleVariant): ExcelRange; dispid 398;
The "Find" wrapper from Excel 2000 is like so: (if I recall correctly)
function Find(What: OleVariant; After: OleVariant; LookIn: OleVariant;
LookAt: OleVariant; SearchOrder: OleVariant; SearchDirection:
XlSearchDirection; MatchCase: OleVariant): ExcelRange; dispid 398;
The last two variants are missing in the 2000 installment. How can I
make this call compatible with both??
Thanks |
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Tue Sep 19, 2006 10:54 pm Post subject: Re: Using Excel XP instead of Excel 2000 in D2006 |
|
|
<<Slycaper:
The last two variants are missing in the 2000 installment. How can
I make this call compatible with both??
If you use the Excel 2000 type library your code will be compatible
with later versions of Excel. However you won't be able to access
later Excel features. If you need those you can either 1) use late
binding for changed methods or 2) use the later type library, but
be extremely careful to use the old versions of all methods that
have changed on machines using 2000 (which you can check by looking
at the ExcelApplication's Version property). If you look at the
type library file you'll see the old versions of all the interface
methods are still there, but prefixed with an underscore.
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html |
|
| Back to top |
|
 |
slycaper Guest
|
Posted: Tue Sep 19, 2006 11:36 pm Post subject: Re: Using Excel XP instead of Excel 2000 in D2006 |
|
|
Deborah Pate (TeamB) wrote:
| Quote: | Slycaper:
The last two variants are missing in the 2000 installment. How can
I make this call compatible with both??
If you use the Excel 2000 type library your code will be compatible
with later versions of Excel. However you won't be able to access
later Excel features. If you need those you can either 1) use late
binding for changed methods or 2) use the later type library, but
be extremely careful to use the old versions of all methods that
have changed on machines using 2000 (which you can check by looking
at the ExcelApplication's Version property). If you look at the
type library file you'll see the old versions of all the interface
methods are still there, but prefixed with an underscore.
|
Thanks Deborah,
I noticed that the interface methods are prefixed with an underscore.
"Open" is one such method. I'm using "_Open" in this case. I cannot
locate the alternate "Find" method. I don't believe there is one. Am I
correct?
Cheers |
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Wed Sep 20, 2006 1:13 am Post subject: Re: Using Excel XP instead of Excel 2000 in D2006 |
|
|
<<Slycaper:
I cannot locate the alternate "Find" method. I don't believe there
is one. Am I correct?
Yes. So with that you have to use late binding so you can omit the
added parameters.
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html |
|
| Back to top |
|
 |
|