Share via


Web Components and Controls

Microsoft® Office Web Components provide the means to make it possible for you publish Office documents to the Web while preserving the interactivity the documents have when they are viewed in their native applications. The Office Web Components are a collection of Microsoft® ActiveX® controls designed to make it possible for you publish fully interactive worksheets, charts, PivotTable reports, and databases to the Web. When users view a Web page that contains an Office Web Component, they can interact with the data displayed in that document right in Microsoft® Internet Explorer. Users can sort, filter, add, or change data, expand and collapse detail views, work with PivotTable lists, and chart the results of their changes. In addition, the Office Web Components are fully programmable, which makes it possible for you create rich, interactive content for Web-based applications.

Note   The Office Web Components work only in Internet Explorer 4.01 or later. Office Web Components on Microsoft® Access data access pages work only in Internet Explorer 5 or later. In addition, you get the most complete functionality with all of the Office Web Component controls in Internet Explorer 5 or later. To view and work with any of the Office Web Components, users must either have Office XP installed, or if your company has an Office XP site license, they must download the Office Web Components from your corporate intranet.

The following table describes the Office Web Components and lists the ActiveX control and object that correspond to each component.

Office Web Component ActiveX control Object Description
Spreadsheet Component Spreadsheet Spreadsheet This component provides a recalculation engine, a full function library, and a simple worksheet user interface for use on Web pages.
Chart Component Chart ChartSpace This component displays a graphical representation of data from a Spreadsheet, PivotTable List, or Data Source control. When bound to other controls on a page, the Chart control updates instantly in response to changes made to the bound controls.
PivotTable Component PivotTable List PivotTable This component makes it possible for users to sort, group, filter, outline, and manipulate data from a worksheet, database, or multidimensional data cube.
(None) Data Source DataSourceControl This control manages communication between a Web page or controls on the page and the source of data for the page. This control provides the reporting engine behind data access pages as well as the PivotTable List control.

All of the Office Web Components expose an object model and are fully programmable by using Microsoft® Visual Basic® for Applications (VBA) within an Office application or by using Microsoft® Visual Basic® Scripting Edition (VBScript) or Microsoft® JScript® code in a Web page. In addition, because the Office Web Components are ActiveX controls, they can be used in any environment that supports ActiveX controls, including all the programming tools in the development environment.

You can use the Object Browser to view the objects, methods, and properties associated with the Office Web Components. To display these items in the Object Browser, you must set a reference to the Microsoft Office Web Components object library (Msowc.dll).

You can insert an Office Web Component control in a Web page in several ways:

  • In Microsoft® Excel, you can use the Publish as Web Page feature to export Excel charts, worksheets, and PivotTable reports to a Web page.

    Note   Not only can you export data from Excel to an Office Web Component control on a Web page, but the Spreadsheet and PivotTable List controls also support exporting data from the control to Excel when you click Export to Excel on the control's toolbar.

  • In Access, you can add an Office Web Component control to a data access page by clicking the Office Chart, Office Spreadsheet, or Office PivotTable tool in the toolbox and then clicking the place on the page where you want the control to appear.

  • In Microsoft® FrontPage®, you can add a Chart, Spreadsheet, or PivotTable List control to a FrontPage document by pointing to Component on the Insert menu, and then clicking Office Chart, Office Spreadsheet, or Office PivotTable.

  • In a Web page, you can insert an Office Web Component control by adding an <OBJECT> tag for the control to the page and then specifying the control's class identifier (CLSID) as the setting for the CLASSID attribute.

See Also

Using Web Technologies with Office XP | Understanding the Spreadsheet Control | Understanding the Chart Control | Understanding the PivotTable List Control | Understanding the Data Source Control