Help !!!

jyotsnas
Member Posts: 62
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
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
______Doubt is the father of Invension_______
0
Comments
-
jyotsnas wrote:
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 ???
No there isn't. You'll have to create one codeunit with your automation code for each Excel Object Library version.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thanks for an instant reply
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:______Doubt is the father of Invension_______0 -
You can't use Automation to check the version, as it depends on the version ;-)
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).No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thanks again for a quick answer.
: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______Doubt is the father of Invension_______0 -
Create a form with the wizard, and use table 2000000046 Automation Servers (select Tabular-Type form). When you do a preview, you see all the automation objects installed, including version no. In your code, you can do a FIND in this table to determine if Office is installed, and what version.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Thanks a lot !!!______Doubt is the father of Invension_______0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions