Inserting Excel Data with the Office Web Components

FrontPage can also connect to Excel spreadsheets using the Office Web Components. The Office Web Components are ActiveX controls that run inside a Web page and look just like their Office counterparts. For example, the Office Spreadsheet Web Component (shown in Figure 40.11) looks and acts just like an Excel spreadsheet.

Figure 40.11. The Office Spreadsheet Web Component is essentially Excel inside a Web page.

graphics/40fig11.gif

Because Office Web Components are ActiveX controls, they are also editable inside the FrontPage interface. In fact, once you've inserted an Office Spreadsheet Web Component, you can enter data in to it and format the data inside it just as you can in Excel.

In order for your site visitors to view an Office Web Component, they must be using Internet Explorer 5.01 with Service Pack 2 or newer, and they must have the Office Web Components installed. Users of Netscape Navigator will not be able to see Office Web Components. Instead, they will see a message informing them of what needs to be installed in order to view the components as shown in Figure 40.12.

Figure 40.12. The Office Web Components are installed on this machine, but they will not work because Netscape does not support them.

graphics/40fig12.jpg

The Office Web Components are automatically installed during a default install of Office 2003. If you haven't installed them, you can run the installation for Office 2003 and select them from the Office Shared Features section of the install, as shown in Figure 40.13.

Figure 40.13. The Office Web Components are part of the Office Shared Features section of Office 2003.

graphics/40fig13.jpg

For users who do not have Office 2003 installed, the Office Web Components can be installed separately using files included in the Office 2003 Resource Kit.

NOTE

For more information on the Office Resource Kit, visit the Microsoft Office Web site at http://www.microsoft.com/office.


An Office Spreadsheet Web Component is composed of a workbook and one or more worksheets. A worksheet is the visible area of the Office Spreadsheet Web Component and is made up of cells arranged in columns and rows. A workbook is a collection of one or more worksheets. When the Office Spreadsheet Web Component is first inserted, it contains three worksheets called Sheet1, Sheet2, and Sheet3. Sheet1 is active and visible when you first insert the Office Spreadsheet Web Component. You can activate other worksheets by clicking the Sheet1 tab in the lower left corner of the Office Spreadsheet Web Component as shown in Figure 40.14.

Figure 40.14. The sheet tab in the Office Spreadsheet Web Component provides access to the sheets in the spreadsheet.

graphics/40fig14.gif

Inserting the Office Spreadsheet Web Component

The Office Spreadsheet Web Component is listed in FrontPage as a Web Component and is inserted from the Insert Web Component dialog box.

  1. Create a new empty page.

  2. Select Insert, Web Component.

  3. Select Spreadsheets and charts in the Component Type list.

  4. Select Office Spreadsheet from the Choose a Control list as shown in Figure 40.15.

    Figure 40.15. The Office Spreadsheet Web Component is located in the Insert Web Component dialog box.

    graphics/40fig15.jpg

  5. Click Finish.

graphics/troubleshooting_icon.jpg

If the Spreadsheets and Charts option is not available, see "Cannot Insert Office Spreadsheet Web Component" in the "Troubleshooting" section of this chapter.


Configuring the Office Spreadsheet Web Component

As previously mentioned, the Office Spreadsheet Web Component acts just like an instance of Excel inside your Web page. You can enter information into it, and you can perform calculations on that information just as you can in Excel. In addition to that, you have complex control over how that information is displayed to users and what they can do with it.

There are two ways to access the properties of the Office Spreadsheet Web Component. One way is to right-click inside the component and select Commands and Options, and the other way is to right-click an edge of the component and select ActiveX Control Properties from the menu. The ActiveX Control Properties menu provides all the options available on the Commands and Options menu in addition to some others, but is not available when the component is rendered in the browser. The Commands and Options menu is available when in FrontPage and when the Web page is rendered in the browser, but not all the design-time options are available at browse-time.

The following tabs are available in the Commands and Options menu when viewing the page in the browser:

  • Format Formats the cell font, color, alignment, and so on.

  • Formula Defines formulas and named ranges.

  • Sheet Provides search functionality and formatting for the selected worksheet.

  • Workbook Provides the interface for creating, deleting, and arranging worksheets and for formatting worksheets.

In addition to the preceding tabs, the following tabs are available in the Command and Options menu only when accessed within FrontPage at design-time:

  • Import Allows you to import data from an external source.

  • Protection Configure which options are available during browse-time.

  • Advanced Configures the advanced options such as width and height of columns and what type of programmatic access the component provides.

  • Data Source Configures the data source for the component when accessing external data.

You can also access properties for the component by clicking once on the Office Spreadsheet Web Component; then right-click one of its edges and select ActiveX Control Properties from the menu to display the ActiveX Control Properties dialog (seen in Figure 40.16).

Figure 40.16. The Format tab provides all the tools to format the appearance of cells.

graphics/40fig16.jpg

The ActiveX Control Properties dialog box contains the tabs discussed in the following sections.

Format Tab

The Format tab formats the currently selected cells. You can configure the font, the numeric format, the appearance of the cells, and the direction of text. The Format tab also contains an undo button (the reverse arrow in the top-left of the tab) so that you can undo any previous changes to the Office Spreadsheet Web Component.

The Format tab is available both at design-time and browse-time.

Formula Tab

The Formula tab (shown in Figure 40.17) displays the formula for the currently selected cell, allows you to enter a new value for the cell, and lists the named ranges in the current worksheet. It also allows you to create new named ranges and delete existing named ranges.

Figure 40.17. The Formula tab lets you work with formulas and named ranges in your Office Spreadsheet Web Component.

graphics/40fig17.gif

The Formula tab is available both at design-time and browse-time.

Sheet Tab

The Sheet tab (see Figure 40.18) provides search functionality for the active worksheet and allows you to control what features are available in the worksheet. There is also a button to allow you to freeze panes in the sheet so that certain cells remain stationary while the sheet is scrolled.

Figure 40.18. The Sheet tab enables you to format the look of the active sheet and lets you search for information in the sheet.

graphics/40fig18.jpg

The Sheet tab is available both at design-time and browse-time.

Workbook Tab

The Workbook tab (see Figure 40.19) controls the calculation options and appearance of all worksheets in the workbook. It is also where you can manage the worksheets in the workbook. You can insert new worksheets, delete existing worksheets, reorder worksheets, and hide worksheets from the Workbook tab.

Figure 40.19. The Workbook tab controls the appearance of the workbook and manages worksheets.

graphics/40fig19.jpg

The Workbook tab is available both at design-time and browse-time.

Import Tab

The Import tab (shown in Figure 40.20) allows you to import data from an HTML file, a comma-separated values file, or an XML file. By checking the Refresh Data from URL at Run Time check box, you can configure the Office Spreadsheet Web Component to automatically update with the latest data each time the Web page is browsed.

Figure 40.20. The Import tab is one way to connect the Office Spreadsheet Web Component to external data.

graphics/40fig20.gif

The Import tab is only available at design-time.

Protection Tab

The Protection tab (seen in Figure 40.21) configures the options that are available in the Office Spreadsheet Web Component when it is being viewed in a Web browser. By default, users of your Office Spreadsheet Web Component can access the Command and Options dialog box and can insert, remove, and rename worksheets. If you want to allow for additional functionality, check the necessary boxes in the Protection tab.

Figure 40.21. The Protection tab controls what users of your Office Spreadsheet Web Component can and cannot configure in the browser.

graphics/40fig21.jpg

The Protection tab is only available at design-time.

Advanced Tab

The Advanced tab (shown in Figure 40.22) is where you can configure the size of columns and rows, the maximum size of the spreadsheet, and other advanced settings.

Figure 40.22. The Advanced tab configures the advanced features of the Office Spreadsheet Web Component.

graphics/40fig22.jpg

The Advanced tab is only available at design-time.

Data Source Tab

The Data Source tab (see Figure 40.23) allows you to configure data connections to other data sources, such as SQL Server databases and other ODBC data sources.

Figure 40.23. The Data Source tab configures advanced data connectivity for the Office Spreadsheet Web Component.

graphics/40fig23.jpg

The Data Source tab is only available at design-time.

Object Tag Tab

The Object Tag tab (shown in Figure 40.24) configures the HTML <object> tag for the Office Spreadsheet Web Component. You can configure the CSS styles for the Office Spreadsheet Web Component, the layout, and the HTML used for browsers that do not support the Office Spreadsheet Web Component. You can also configure a code source URL for those who need to download and install the control.

Figure 40.24. The Object Tag tab configures generic ActiveX control settings.

graphics/40fig24.jpg

The Object Tag tab is available for all ActiveX controls and is not specific to the Office Spreadsheet Web Component. It is the only tab that is available in the ActiveX Control Properties dialog box and not available in the Command and Options dialog box of the Office Spreadsheet Web Component.



Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net