Microsoft KB Archive/258187
Article ID: 258187
Article Last Modified on 8/9/2004
- Microsoft Office Spreadsheet Component 9.0 1.0
- Microsoft Office Chart Component 9.0
- Microsoft Office PivotTable Component 9.0 1.0
This article was previously published under Q258187
OWebComp.exe is a self-extracting executable file that contains a series of scripting samples that demonstrate the features and usage of the Microsoft Office Web Components. The samples use VBScript and Active Server Pages (ASP).
The following file is available for download from the Microsoft Download Center:
The samples demonstrate scripting techniques for the Microsoft Spreadsheet Component that involve:
- Loading and retrieving data
- Cell and sheet protection
- Handling various events raised by the Spreadsheet Component
- Property bindings
- Custom sorting and filtering
The samples demonstrate scripting techniques for the Microsoft Chart Component that involve:
- Creating the different types of charts that the Chart Component supports
- Formatting various chart elements
- Using literal data for chart creation as well as using data from the other components
- Handling various events raised by the Chart Component
- Working with multiple charts
- Custom sorting and filtering
- Generating static chart images server-side
The samples demonstrate scripting techniques for the Microsoft PivotTable Component that involve:
- Using tabular and OLAP data sources
- Using XML data
- Formatting various elements of the report
- Handling various events raised by the PivotTable Component
- Bindings with the Chart Component
- Adding filters, totals, and fieldsets at run time
- Generating static reports server-side
Using the Samples
The samples included in the OWebComp.exe file require Microsoft Office 2000 and Microsoft Internet Explorer 4.01 or higher. The majority of the samples are client-side scripts and can be run using a FILE:// protocol. Therefore, a Web server is not needed to run the client-side script samples. The server-side script samples do require a Web server configured with Microsoft Internet Information Server 4.0 or 5.0.
- Extract the contents of OWebComp.exe. The default folder is C:\Program Files\OWebComp but you can change this to a folder of your preference.
If you are using an HTTP:// protocol to access the samples, you must modify the constant sDataPath in ..\OWebComp\Data.htm to specify the correct location of the data files that the samples use. For example, if you extracted OWebComp.exe to the folder C:\InetPub\wwwroot\OWebComp, the contents of Data.htm should appear as follows:
Const sDataPath = "C:\InetPub\wwwroot\owebcomp\data" Function GetDBPath() Select Case UCASE(document.protocol) Case "FILE PROTOCOL": GetDBPath = "..\data" Case "HYPERTEXT TRANSFER PROTOCOL": GetDBPath = sDataPath Case Else: GetDBPath = vbNullString End Select End Function
NOTE: You can specify a path for the sDataPath constant that represents a shared folder using either a mapped drive or UNC.
- To use the FILE:// protocol for accessing the samples, double- click Default.htm in the OWebComp folder.
To use the HTTP:// protocol for accessing the samples, use an HTTP:// URL to navigate to Default.htm in the OWebComp folder.
- Some of the ASP scripts require a Session object to create and manage temporary files. Use IIS Manager to set the following folders as Application start points with Scripting permissions:
The design and layout of the samples work best with a screen resolution of 800x600 or higher. Note that this is not a design limitation imposed by the Office Web Components but rather one imposed by the nature of these samples. The samples are instructional and, as such, there are lengthy descriptions and notes to the reader that are displayed in most of the samples.
Some of the samples use the VBScript CreateObject statement to use the FileSystemObject for file access. If you receive errors running the samples, check your security settings in Internet Explorer to confirm that you can script ActiveX controls.
Problems with Server-Side Use
You should be aware that the Office 2000 Web Components are not designed for server-side use, and you may encounter problems if you use the components on a server with a high number of concurrent user connections. Many of these issue are addressed in the Office XP Web Components, and you should consider using the Office XP Web Components for large-scale server-side solutions.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
317316 INFO: Limitations of Office 2000 Web Components When Used Server-Side
For more information, see the following Knowledge Base article:
195826 PRB: CreateObject Fails from Client-Side Scripts
(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Harsha Bennur and Lori Turner, Microsoft Corporation.
Additional query words: OWebComp WebCalc WebChart WebPivot pivot OWC HTMLURL HTMLData CSVData CSVURL LoadText RecordsetDef ViewableRange EndEdit ExportPicture ChartSpace ChartDataSource SelectionChange RangeFromPoint Axes Scaling PivotRowMember PivotColumnMember PivotData
Keywords: kbdownload kbofficewebchart kbpivottable kbfile kbsample kbofficewebpivot kbofficewebspread KB258187