Tải bản đầy đủ (.pdf) (12 trang)

Publishing a Pivot Table

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (263.93 KB, 12 trang )

211
CHAPTER 10
■ ■ ■
Publishing a Pivot Table
A
fter you create a PivotTable report, you may want to publish the pivot table, its pivot
chart, or the entire workbook, on a web page. In Excel, you can create files in HTML for-
mat, with or without interactivity. Without interactivity, a PivotTable or PivotChart report
can be viewed on a web page, but not manipulated. With interactivity, visitors to the web
page can modify the PivotTable or PivotChart report layout, select from the pivot field
dropdown lists, and make other changes.
If you choose to add interactivity, an Office Web Component (OWC) is created, based
on the Excel worksheet, pivot table, or pivot chart. In order to view or interact with your
OWC PivotTable list, visitors to the web page need to have Office 2003 Web Components
installed, as described in “How It Works” in Section 10.3.
This chapter will focus on the steps you can take within Excel to prepare and publish
the Excel pivot table and pivot chart.
10.1. Publishing a Pivot Table: Understanding HTML
Problem
When you save an Excel file as a web page, it’s saved in Web Page format, with an .htm or
.html extension. You’re not familiar with that format, and would like to learn more about it.
Solution
Files saved as web pages in Excel are saved in HyperText Markup Language (HTML) for-
mat. HTML is a language that’s used to create web pages. You don’t need to know anything
about the language to create an HTML file from an Excel file—the format is automatically
created for you when you save a file as a web page.
For a good introduction to HTML, see the National Center for Supercomputing Applica-
tions (NCSA) article “A Beginner’s Guide to HTML,” at />General/Internet/WWW/HTMLPrimerP1.html.
6293ch10.qxd 2/1/06 2:31 PM Page 211
10.2. Publishing Without Interactivity: Preparing the Excel File
Problem


You’ve been asked to publish your workbook on the company website, so visitors can see
the PivotTable report and PivotChart report that summarize the company sales and the
source data that’s on a different worksheet.
Solution
You can create a web page from your Excel file without interactivity. The web page will
contain a static picture of the Excel file contents, in which visitors can view the informa-
tion but not change it. Prepare the workbook, pivot table, and pivot chart to ensure that
visitors can find the information they need, and then save the file as a web page.
Preparing the Workbook
1. Ensure that columns are wide enough to show all the data they contain, and that
rows are tall enough. Because the published HTML file is static, users won’t be
able to adjust the cell width or height.
2. Add any formatting that you want to display on the web page. Some formatting,
including the items listed here, is not retained when a noninteractive workbook is
published.
• Rotated text in cells
• Cell fill pattern
• Double underline
• Sheet tab color
• Cell comment triangles (these are changed to numbers)
3. Give each worksheet a meaningful name, to help visitors navigate through the work-
book. For example, change the default name Sheet1 to Sales Data. Even if sheet tabs
are turned off in the Tools ➤ Options, View tab, they will be visible on the web page.
4. If you are publishing the entire workbook, delete any unused worksheets so visitors
aren’t confused by blank sheets. If more than one sheet in the workbook contains data
or formatting, all visible sheets will appear in the published workbook. Although
you plan to publish the file without interactivity, the sheet tabs in the published
workbook can be clicked to view each sheet (see Figure 10-1).
10.2


PUBLISHING WITHOUT INTERACTIVITY: PREPARING THE EXCEL FILE212
6293ch10.qxd 2/1/06 2:31 PM Page 212
Figure 10-1. Sheet tabs appear in Internet Explorer when multiple sheets are
published.
10.2

PUBLISHING WITHOUT INTERACTIVITY: PREPARING THE EXCEL FILE 213
Preparing the PivotTable Report
1. Add all required fields to the PivotTable report layout, as visitors won’t be able to
change the layout.
2. Don’t place fields in the page area unless you plan to filter the pivot table data
before publishing it. Otherwise, the page fields take up space at the top of the web
page, and don’t add value to the information presented.
3. Ensure that all columns in the PivotTable report are wide enough to show the data
they contain, and that all rows are tall enough.
4. Add any formatting that you want to display in the PivotTable report. For the web
version of the PivotTable report, you may want more color than you would use in
a printed copy.

Tip
To quickly format the PivotTable report so it has impact on the web page, you can select a cell in the
PivotTable report, and choose Format ➤ AutoFormat.
Preparing the PivotChart Report
1. Add all required fields to the PivotChart report layout.
2. Don’t place fields in the page area unless you plan to filter the data before publish-
ing the chart. Otherwise, the page fields take up space that could be used by the
chart’s plot area.
3. Hide the PivotChart field buttons to reduce the clutter in the chart.
4. Add a title to the chart to explain its content. If the chart has been filtered, include
that information in the title, for example, Sales – Eastern Region – 2006.

5. When published, the text on a chart sheet may appear blurred (see Figure 10-2).
6293ch10.qxd 2/1/06 2:31 PM Page 213
Figure 10-2. Blurred text in a published PivotChart on the chart sheet
Figure 10-3. Clear text in a published PivotChart embedded on the worksheet, with
the PivotChart fields hidden
10.2

PUBLISHING WITHOUT INTERACTIVITY: PREPARING THE EXCEL FILE214
If possible, move the chart to a regular worksheet, and publish it there. The text
quality will be better (see Figure 10-3), and you can easily adjust the size of the
chart so it fits on the web page.
Previewing the Web Page
After preparing the workbook, PivotTable report, or PivotChart report, you can see how it
will look on a web page. This technique displays the entire workbook as a web page, with
interactive tabs that allow you to view any sheet. If your PivotTable report or PivotTable
report is on a worksheet with other data, that data will also be included in the preview.
When saving the file as a web page, you can specify which regions you want to publish.
6293ch10.qxd 2/1/06 2:31 PM Page 214
10.3

PUBLISHING WITH INTERACTIVITY: PIVOT CHARTS AND PIVOT TABLES 215
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.
6293ch10.qxd 2/1/06 2:31 PM Page 215

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×