How to obtain Microsoft Office Object Library?

General discussion forum about all things Team Developer 7.x
alisa.nua
Thailand
Posts: 8
Joined: 10 Aug 2017, 08:24
Location: Thailand

How to obtain Microsoft Office Object Library?

Post by alisa.nua » 11 Oct 2017, 04:53

Right now I'm using old version of Microsoft Office 9.0 Object Library.apl and Microsoft Excel 9.0 Object Library.apl
which work for a certain version of Microsoft Excel (2003).

I would like my program to work with a newer version of Microsoft Excel, say 2010 or so. Do I need a later version of
Microsoft Office Object Library.apl and Microsoft Excel Object Library.apl? If so, how do I obtain them?

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 261
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: How to obtain Microsoft Office Object Library?

Post by Dave Rabelink » 11 Oct 2017, 05:18

Well that depends.
If you need functionality from the library which is introduced in a particular Office version, you really need the library for that version at minimum.
But mostly, the old libraries will still work on a new Office version. Most of my old code, using old Office Object libraries still work on the latest Office versions.

So, when you really need new stuff from Office to automate, you need that Office version installed (or later versions which also supports that feature) and generate the AX library using the ActiveX Explorer in TD (Menu Tools/ActiveX Explorer). But then you must be aware that your application will only work with that minimum Office version and will fail on older ones.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 46
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: How to obtain Microsoft Office Object Library?

Post by Uwe van der Horst » 11 Oct 2017, 08:32

Dave Rabelink wrote:
11 Oct 2017, 05:18
[..]But mostly, the old libraries will still work on a new Office version. Most of my old code, using old Office Object libraries still work on the latest Office versions.
Indeed. After generating the AX library using the ActiveX Explorer in TD you have a huge apl which takes some time when compiling. So we decided to comment out most of the classes and functions that we don't need. And we are still using the libraries for Microsoft Office 97. It's like a VW Beetle, it runs and runs and runs... :D
Best regards,
Uwe van der Horst
Advo-web GmbH

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 84
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: How to obtain Microsoft Office Object Library?

Post by Jeff Luther » 11 Oct 2017, 16:57

It's like a VW Beetle, it runs and runs and runs...
LOL, so true, Uwe!! I had one for 17 years!
Jeff Luther @ PC Design
Palm Springs, California
TD info. & samples: http://www.jeffluther.net/TD/

alisa.nua
Thailand
Posts: 8
Joined: 10 Aug 2017, 08:24
Location: Thailand

Re: How to obtain Microsoft Office Object Library?

Post by alisa.nua » 16 Oct 2017, 03:36

Thank you for the clarification. I guess I need to check which function exactly that doesn't work and fix it.

However, is there a way to not installing the Microsoft Office Excel in the server but still allowing the program to import/export .xls/.xlsx?
I can see that the Grid import and export function don't need the Excel but how about other cases?

clemdoc
Austria
Posts: 4
Joined: 08 Mar 2017, 09:51
Location: Austria

Re: How to obtain Microsoft Office Object Library?

Post by clemdoc » 18 Oct 2017, 09:04

alisa.nua wrote:
16 Oct 2017, 03:36
Thank you for the clarification. I guess I need to check which function exactly that doesn't work and fix it.

However, is there a way to not installing the Microsoft Office Excel in the server but still allowing the program to import/export .xls/.xlsx?
I can see that the Grid import and export function don't need the Excel but how about other cases?
AFAIK, if you want to use Office Automation, you have to install the programs. If you don't want to do that, there are some ways I could think of:
- Find some third party library / component that can do what you want and is usable fom TD.
- Write the library yourself in C#/.Net using the OpenXML SDK and implement a COM wrapper to be used with your TD app (that would be my choice, but I haven't looked into it more than superficially). EPPlus sounds like a good start.
- Rather illusionary and only for xlsx: Unzip the XLSX file and parse the XML stuff within in TD (no, you don't really want to go that way).

hth, clem

PS: Edited to include EPPlus

Return to “General Discussion”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests