Work with Excel 97 AND 2000??
Hi,
My app needs to be able to do some simple (?) stuff with Excel, and it needs
to work with Excel 97 "or later." I.e., it absolutely has to work with Excel
97 and 2000, and we'll deal with newer versions as they appear. I'm using
Delphi 4.03, and it's not likely we'll upgrade to D5 soon enough to be of
any help.
In order to work with multiple versions, DO I HAVE TO USE "LATE BINDING"?? I
have done everything I need using the EXCEL8.OLB type library, not realizing
until the end that it wouldn't work with Excel 2000. How can I translate
that into something that works with different versions of Excel?
I do NOT have a good grasp of the different ways to do COM stuff.
(Interface, Dispinterface, OleVariant.) I'm busily reading everything I can
find, including D. Pate's stuff and D4DG (Pacheco/Texeira) chapter 23, but I
would really appreciate some quick lessons.
The app needs to:
- Open a delimited text file, with specific field-formatting requirements.
Currently, with early binding, I'm using the OpenText method and providing
the FieldInfo array.
- Move a worksheet from one workbook to another.
- Open an existing .XLS file and run a macro.
- Set Excel free so that the user can continue editing, etc., as long as he
likes. Once set free, my app doesn't need to know what else happens.
- Change Visible, DisplayAlerts and other such things appropriately.
As I said, I've figured out how to do all the above via the Excel8 type
library, but have no idea how to make it version-independent.
Many thanks,
Julian Slade