Office Web Components (OWC) – Part I

What are OWC?
For a week ago I asked Dick if some post concerning the Office Web Components (OWC) would be of general interest for the visitors of the Daily Dose of Excel. The answer was clear so here is the first of several posts about OWC.

Per se itís a library that includes a set of ActiveX controls that are powerful but are also fairly complex.

The library contains the following controls:
* The Microsoft Pivottable control
* The Microsoft Excel Spreadsheet control
* The Microsoft Excel Charting engine
* The Microsoft Office Data Source control
* The Microsoft Record Navigation control (Included in the latest available version 11.0)

The controls target various purposes but the primarily area is for reporting and analysis of structured and already created data. They look, feel and behave like smaller versions of their siblings in Microsoft Office but they both differ and can be more powerful, especially the Pivottable control. The programming object models for the OWC are both similar and at the same time differ a lot, which may cause some confusing.

OWC were created to fill the need to present data from databases and OLAP for the Internet / Intranet. But since they are standard ActiveX controls they also can be used in forms with any developing platforms that support COM like MS Visual Basic 6.0 / VB.NET and VBA.

Controls are usually divided into two groups, the group that are visible and used in control containers like forms and the group that can only be in memory as invisible controls. Compared with other ActiveX controls OWC have one major advantage, they can be used either as visible controls or in memory as invisible controls. The later ability gives the option to create server-generated static content in a fast way.

The primary ways for connecting to data sources and to retrieve data, for present available versions, is with ADO. Since the Pivottable, Spreadsheet and Chart controls have a built-in data source control itís not necessary to explicit use the Data Source Control.

If we intend to use one or more of these controls with Excel the best solution is to create COM add-ins in VB. The reason for it is that later versions of Excel show a security message whenever the forms are initialized: ìThe application is about to initialize ActiveX controls that might be unsafeÖî and the smoothest way to solve it is simple to use COM add-ins.

Since the controls have no technology dependency with MS Office they can coexist with both earlier as well as later versions of MS Office. Per se they can be used without having any Office version installed at all. However, the coming parts will show how we can interact between these controls and Excel.

OWC was first released when the version 2000 of MS Office was shipped and since then MSFT have released a new version of OWC when new Office versions have been released.

A general recommendation is to always make sure to use the latest available version of OWC as it still is under developing, i e bugfixes, new properties / methods are added etc.

When the first version (9.0) was released there were a lot of legal questions and restrictions for using them. Later versions (10.0 and 11.0) have different and freer terms.
For more information please see Office Web Component (OWC.) licensing

In addition, the first version was quite buggy and the documentation can to some extend being considered to be very confusing.

All in all the combination probably lead to create a badwill for OWC among developers and perhaps also explain why OWC is still an extremely low profiled MSFT-product.

If you want to use the latest available version of OWC, that is 11.0, it can be downloaded from the following URL: Office Web Components

Otherwise itís available on the MS Office CD.

In the next coming part the Pivottable control will be in focus and it will show how we programmatically can control and manipulate the control with MS VB 6.0.

Kind regards,
Dennis

Posted in Uncategorized

5 thoughts on “Office Web Components (OWC) – Part I

  1. Me too….

    Excellent to see that Dick has added you to the illustrious list of contributors Dennis.

  2. Is it possible to load Add-ins along with the spreadsheet component? I’d like to use the spreadsheet component in a .NET app I have, but I need the functioality of an external add-in.

    How can you load/unload Add-ins with OWC?


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.