Hi all
Posting for the first time - hope to get reply as soon as possible.
i am working on a codeunit that is supposed to read from and wrirte to an Excel file. Simple .. right !!!
i have office 97 installed on my machine - so included Microsoft Excel 8.0 Object Library as source of Automation object.
my friend, who has office 2000 installed on his machine - imported this codeunit. tried to execute and hooooooo Got an error for it couldnt find the Excel8.0 object library.
:twisted: that was irritating
then i changed the source to Excel 9.0 Object Library. it worked fine then.
but still - is there any way to avoid changing sources everytime u encounter different version of Office ???
Help me to get through this folks
Comments
No there isn't. You'll have to create one codeunit with your automation code for each Excel Object Library version.
if i got it right , u mean to say that i'll have to create a separate codeunit for each version of Excel Object Library.
if i got it right , i have one more thing to ask :?
suppose these codeunits are gonna reside on server, then each of them will be called according to the version of Office the client is using. How can i predict the version that client is using.
the question may seem stupid - but i think as a newcomer i have liberty to ask it - :oops:
Or you add a field to the user table, where you keep track of the installed Office version. Or maybe you can look at the dll-file installed on the client PC, to determine the version (look at length of file, or inside the dll).
:idea: i tried out this option just now. i created my own DLL that uses this EXCEL object library ( 8.0 on my machine ).
when i registered this DLL on my friend's machine, it worked
it may be checking for excel versions on its own. but again, i'll have to register it on every client machine manually.
what do u say about it ???
:?
Do u have any idea how i can check for installed versions of the Office ?
Hope to get assistance from u.
Thank You