About PivotTable lists

A PivotTable list is an interactive table that you can use to analyze data dynamically from within your Web browser. You can use a PivotTable list to view and organize data from lists or databases, look for information or details, and create personalized summaries and reports. You can also add, edit, or delete the detail data that is displayed in a PivotTable list.

The following illustration shows a simple PivotTable list that displays summarized data.

PivotTable list example

When you create a PivotTable list, you select data from an external database or other source that you want to make available to viewers on your Web page. This data becomes the source data in the PivotTable list. You can then set up an initial presentation or view of the data, such as the summary shown in the preceding example, that analyzes the data in one of the many ways possible. You do this work in a design program, such as Microsoft Excel or Microsoft Access.

After you make the PivotTable list available on a Web page by publishing it, users who have the Microsoft Office Web Components — and a browser that supports PivotTable lists, such as Microsoft Internet Explorer 4.01 or later —  can also analyze the data. In the browser or other run-time environment, users can display different fields and change your initial view to suit their needs. Depending on your design program and methods, you might also be able to make the PivotTable list available in programs other than browsers.

When to use a PivotTable list

The Microsoft Office Web Components provide a set of tools that you can use to include interactive PivotTable lists, spreadsheets, and charts on your Web pages. Each component has features and capabilities that suit it to particular uses.

A PivotTable list is the right choice when you want to provide information from a database — such as Microsoft Access or SQL Server records or OLAP data from a Microsoft SQL Server OLAP Services database — in a form that users can interact with and analyze from within the Web browser or in a run-time environment. You can also choose to allow the user to add, edit, or delete detail data.

Here are some examples of good applications for PivotTable lists:

If users will view data without interacting with it, a noninteractive table might be a simpler way to display static data. For information about other ways to make data available on a Web page, see Help for your Web page design program.

Creating a summary report

The following series of examples show how you, working in a design program, or a user, working in a browser, could turn a set of records from a database into a summary report. In the simplest form that you can create, a PivotTable list displays the records from the source data in a grid with the field names across the top. The following example contains fields named Sport, Quarter, and Sales.

PivotTable list example with all detail fields

1  Drop areas

2  Detail fields

You can create a summary by moving fields to other areas and sorting fields to produce a logical organization. For example, the PivotTable list that follows takes the preceding example and shows how you could create a summary by moving the Sport field to the row area to organize the data by sport, and then sorting the Quarter field to put the sales in chronological order.

PivotTable list example with row field

1  Row field

2  Items

To compare the sales for each sport in each quarter, you can move the Quarter field to the column area, as shown in the following illustration.

PivotTable list example with row and column fields

1  Column field

2  Items

To view and compare total sales instead of the detailed sales data, you can add a Sum of Sales total field and then hide the detail data for the Sport and Quarter fields. A total field provides the values that are summarized in the PivotTable list. In the following example, the lower-right cell shows a total of the Tennis sales in Qtr4 — that is, the sum of the sales figures from every row in the source data that contains Tennis for the sport and Qtr4 for the quarter.

PivotTable list example with summary data

1  Total field

To create the summary report that is shown at the beginning of this topic, you could then display grand totals for the Sport and Quarter fields.

To further analyze the data, you could filter the fields to find specific data. For example, you could display only the data about tennis sales in the third quarter. You could also add other calculations to the list. For example, you could display the largest sales amount for each sport.

Designing and publishing a PivotTable list

If you need general information about Web page design, consult Help for the program you use to create your Web pages or Web site. Two programs that you can use to create Web pages with PivotTable lists are Microsoft Access (available in the Microsoft Office Professional and Premium editions) and Microsoft FrontPage (available in the Premium edition).

Before you begin

Before you begin designing a PivotTable list, you should consider whether your users will interact with the data or only view the data.

PivotTable lists are designed to present lists and information from databases for interactive use. Depending on the results you envision, you might want to use a different Microsoft Office Web Component or include other controls along with the PivotTable list.

The design program is the program you use to create the PivotTable list. Different design programs have different capabilities.

Step 1: Prepare the source data

The source data is the information that you want to display and analyze in the PivotTable list. Depending on the design program you're using and the type of source data you want to display, you might need to set up a data source or create a query before you can include the data in the PivotTable list. A data source is a means of recording the information necessary to connect the PivotTable list to the data in a database, and a query is a means of specifying which information to retrieve from the database. For information and instructions about accessing source data from your design program for use in a PivotTable list, see Help for that design program.

When you publish a PivotTable report from Microsoft Excel to a Web page, Excel does part of the design work for you. However, some elements of PivotTable reports are changed when you save a report as a PivotTable list for the Web. You might need to modify some elements, such as custom calculations, to display the results you want.

Step 2: Create or open a PivotTable list

The specific steps to create a PivotTable list vary for different design programs. For specific information, see Help for your design program.

If you have an existing PivotTable list that you want to modify, such as one saved from a Microsoft Excel PivotTable report or copied from another Web page, you can open the file containing the PivotTable list in a design program and then activate the control by following the instructions in that program (usually by clicking or double-clicking the PivotTable list). For details, see Help for your design program.

When you create a new PivotTable list, you'll usually designate an initial area of your Web page for the list to occupy, relative to other elements on the page. After you attach the source data (see step 3 of this process), you can allocate the amount of space it can use and then move the PivotTable list to the best position (see step 4 of this process).

After you create or select a PivotTable list in a design program, you work in the PivotTable list and continue to design it by using the toolbar and the Commands and Options dialog box in the PivotTable list.

Step 3: Attach the source data to the PivotTable list

If you're working with an existing PivotTable list, the source data might already have been associated with the control and might also have been stored with the control itself. For a new PivotTable list, you need to establish a connection with the source data you've prepared in your design program.

Step 4: Allocate space for the PivotTable list

Within the PivotTable list itself, you can set a fixed height and width or allow the PivotTable list to expand up to a maximum size that you set, displaying scroll bars as necessary. These settings determine both the size of the PivotTable list in the browser and the size of the area you have to work with while designing the presentation of the data in the design program. Later, if you want a different amount of space for the PivotTable list, or if you want different settings for the browser than you are using to design, you can change these settings.

Step 5: Design the data layout

After you create a PivotTable list and add source data to it, the next step is to determine how you want the data to be presented when users first open your Web page.

Step 6: Restrict access in the browser

Even in a browser that fully supports PivotTable lists, such as Microsoft Internet Explorer 5, users do not have access to some of the commands and features that you can use in a design program. To prevent users from making changes or accessing parts of the source data that you don't want to make available, you can set more restrictions.

Step 7: Add other controls, automation, or help

You can do one or more of the following:

Step 8: Test and publish

Before making the PivotTable list available to your users, it is recommended that you test it in a Web browser. Microsoft Internet Explorer 4.01 or later is recommended for users who want to interact with PivotTable lists. If your users have different browser versions, you might want to test the PivotTable list in each version to make sure all your users will be able to accomplish the tasks you intend at run time. If you provide your own help for the Web page, make sure your help looks and works the way you intended.

If you aren't satisfied with the PivotTable list and Web page, you can go back into the design program and make changes. In addition to changing the settings you made while you designed the data layout and customized the PivotTable list, you can change the layout or remove the fields that you don't want.

When you are satisfied with the results, make your Web page available to your users. For information about publishing Web pages, see Help for your design program or consult with your Webmaster.