Publishing with Interactivity: Pivot Charts and

Một phần của tài liệu Excel PivotTables Recipe Book (Trang 240 - 244)

1. Select any cell in the workbook.

2. Choose File ➤Web Page Preview.

3. Your default web browser will open, with the active sheet in the workbook displayed.

4. If sheet tabs are visible, you can click them to view other sheets.

5. Close the web browser program, and make any adjustments required to the Excel file before publishing.

Publishing the Web Page

After you prepare and preview the web page, you can publish it without interactivity by choosing File ➤Save as Web Page. For detailed instructions, see Excel’s Help.

10.3. Publishing with Interactivity: Pivot Charts and Pivot Tables

Problem

You’ve been asked to publish your pivot chart and pivot table on the company website, so visitors can change the layout and select items from the pivot field dropdown lists.

Solution

If you publish a pivot table or pivot chart with interactivity, visitors will be able to make changes to the pivot table and pivot chart on the web page, such as adding and removing fields and creating formulas. Office Web Components (OWCs) are created in the HTML file, based on the objects in the Excel file. These will look different than the Excel objects, and have different functionality. Prepare the pivot table and pivot chart to optimize the components that will be created on the web page.

Note If you publish the entire workbook with interactivity, charts won’t be included, and PivotTable reports will be static on the worksheet.

1 0 . 3 ■ P U B L I S H I N G W I T H I N T E R A C T I V I T Y: P I V OT C H A RT S A N D P I V OT TA B L E S 216

Preparing the PivotTable Report

1. Most formatting will be lost when you publish a pivot table with interactivity.

However, number formatting will be retained if you use the PivotTable Field set- tings dialog box, instead of selecting cells in the pivot table to format. To do this, right-click on a pivot table cell, and choose Field Settings.

2. If the worksheet that contains the pivot table or pivot chart is protected, remove the password if one is used. Password-protected sheets can’t be published as web pages.

Preparing the PivotChart Report

1. Select a chart type and subtype that best presents the data. Visitors won’t be able to change the chart type. The Cone, Cylinder, and Pyramid chart types will be changed to Column charts in the web page. Charts with a Surface chart type will not be loaded on the web page.

2. If there’s a data table on the chart, it won’t appear in the published pivot chart.

You can add value labels to the chart series to display the values, or remind visi- tors that values will be displayed when they point to a data point on the chart.

Publishing the Web Page

To create an HTML file from your PivotChart and PivotTable report that can be published on a website with interactivity, follow these steps:

1. Select any cell in the workbook.

2. Choose File ➤Save As Web Page.

3. Select the directory in which you want to store the HTML file.

4. Click the Publish button to open the Publish as Web Page dialog box.

5. Under Item to publish, from the Choose dropdown, select Items on [Name of sheet that contains the PivotChart report].

6. In the list of items, select your PivotChart report.

1 0 . 3 ■ P U B L I S H I N G W I T H I N T E R A C T I V I T Y: P I V OT C H A RT S A N D P I V OT TA B L E S 217

Note When you publish a pivot chart, the connected pivot table is automatically published on the same web page.

7. Click in the Add interactivity with box to add a checkmark.

8. If you want to add a title to the published page, click the Change button and type a title. The title will appear above the published components.

9. Click OK to close the Set Title dialog box, and the title will be displayed on the Publish As Web Page dialog box, to the left of the Change button.

10. To automatically update the HTML file, if the Excel file is saved, add a checkmark to AutoRepublish every time this workbook is saved.

Tip Select this option if you expect to change the Excel file later and will want to publish the updated version. It will save an updated version of the HTML file without any extra work on your part.

11. To immediately see the results in your browser, add a checkmark to Open published web page in browser.

12. Click the Publish button to save the file.

How It Works

When you publish a pivot table and select the interactivity option, an Office Web Compo- nent (OWC) PivotTable list is added to the HTML file. This component has some features similar to those of an Excel PivotTable report, as well as some features that are different.

A folder is also created with the name of the HTML file, followed by _files, that contains files with information about the published file. For example, one of the files in the folder has the same name as the HTML file, followed by a random number and _cachedata.xml.

This file contains the source records for the PivotTable list. Upload both the HTML file and the folder when putting the files on your web server.

You can publish the HTML file as created by Excel, or modify it in Microsoft FrontPage or another website-creation software package.

1 0 . 3 ■ P U B L I S H I N G W I T H I N T E R A C T I V I T Y: P I V OT C H A RT S A N D P I V OT TA B L E S 218

Licensing

To interact with the PivotTable list component on a web page, users must use Microsoft Internet Explorer 5.01 or later, and must have a valid license for Microsoft Office 2003 or for a later version of Microsoft Office that includes the Office 2003 Web Components.

Without a license, users are in View-only mode, and can do the following:

• View data

• Print

• Select and scroll

• Use hyperlinks

• Resize a component

• Select sheets in the Spreadsheet component

• Expand or collapse members in a PivotTable list

• Refresh data in a PivotTable list

• Use the About, Help, and Refresh commands

For information on OWC licensing requirements, see the Microsoft Knowledge Base article

“General Information About the Licensing and the Use of Office 2003 Web Components,”

at http://support.microsoft.com/default.aspx?scid=828949.

OWC Features

It’s beyond the scope of this book to provide extensive coverage of the OWC PivotTable features, but we’ll outline some of the key similarities and differences between the two types of pivot tables.

The OWC PivotTable will contain the page, row, column, and data fields from your Excel PivotTable report. The fields can be moved to a new location, or removed from the pivot table. Click the Field List button in the OWC toolbar to open the field list and add more fields to the pivot table.

The Summary functions for the data fields are those that appeared in the original Excel PivotTable and can’t be changed. You can create custom calculations, such as Percent of Row, Calculated Totals, and Calculated Detail Fields.

Một phần của tài liệu Excel PivotTables Recipe Book (Trang 240 - 244)

Tải bản đầy đủ (PDF)

(336 trang)