Skip to content

Commit 4ffbce6

Browse files
committed
clean up docs\spreadsheet\working-with-pivottables.md
1 parent 1557411 commit 4ffbce6

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

docs/spreadsheet/working-with-pivottables.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ ms.suite: office
1111
ms.author: o365devx
1212
author: o365devx
1313
ms.topic: conceptual
14-
ms.date: 11/01/2017
14+
ms.date: 01/14/2025
1515
ms.localizationpriority: high
1616
---
1717

1818
# Working with PivotTables
1919

20-
This topic discusses the Open XML SDK <xref:DocumentFormat.OpenXml.Spreadsheet.PivotTableDefinition> class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see [Structure of a SpreadsheetML document](structure-of-a-spreadsheetml-document.md).
20+
This topic discusses the Open XML SDK <xref:DocumentFormat.OpenXml.Spreadsheet.PivotTableDefinition> class and how it relates to the Open XML File Format SpreadsheetML schema. For more information about the overall structure of the parts and elements that make up a SpreadsheetML document, see
21+
[Structure of a SpreadsheetML document](structure-of-a-spreadsheetml-document.md).
2122

2223
## PivotTable in SpreadsheetML
2324

24-
The following information from the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification introduces the **PivotTableDefinition** (\<**pivotTableDefinition**\>) element.
25+
The following information from the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification introduces the `PivotTableDefinition` (`<pivotTableDefinition/>`) element.
2526

2627
PivotTables display aggregated views of data easily and in an
2728
understandable layout. Hundreds or thousands of pieces of underlying
@@ -85,18 +86,18 @@ is displayed in the cells of a worksheet and therefore you need to
8586
construct them as well. You can also have the user update the PivotTable
8687
cells when opening the document.
8788

88-
The following table lists the common Open XML SDK classes used when working with the **PivotTableDefinition** class.
89+
The following table lists the common Open XML SDK classes used when working with the `PivotTableDefinition` class.
8990

9091
| **SpreadsheetML Element** | **Open XML SDK Class** |
9192
|---------------------------|-------------------------------------------------------------------------------------------------------------------|
92-
| pivotField | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotField> |
93-
| pivotCacheDefinition | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotCacheDefinition> |
94-
| pivotCacheRecords | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotCacheRecords> |
93+
| `<pivotField/>` | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotField> |
94+
| `<pivotCacheDefinition/>` | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotCacheDefinition> |
95+
| `<pivotCacheRecords/>` | <xref:DocumentFormat.OpenXml.Spreadsheet.PivotCacheRecords> |
9596

9697
## Open XML SDK PivotTableDefinition Class
9798

98-
The Open XML SDK**PivotTableDefinition**
99-
class represents the PivotTable definition (\<**pivotTableDefinition**\>) element defined in the Open XML File Format schema for SpreadsheetML documents. Use the **PivotTableDefinition** class to manipulate individual \<**pivotTableDefinition**\> elements in a SpreadsheetML document.
99+
The Open XML SDK `PivotTableDefinition`
100+
class represents the PivotTable definition (`<pivotTableDefinition/>`) element defined in the Open XML File Format schema for SpreadsheetML documents. Use the `PivotTableDefinition` class to manipulate individual `<pivotTableDefinition/>` elements in a SpreadsheetML document.
100101

101102
The main function of the PivotTable definition is to store information
102103
about which field is displayed on which axis of the PivotTable and in
@@ -109,30 +110,30 @@ added to the workbook part, and defines the caption label to display
109110
above the data area of the PivotTable. All of these elements are
110111
required.
111112

112-
The three main pieces of the **pivotTableDefinition** are: the location of the
113+
The three main pieces of the `PivotTableDefinition` are: the location of the
113114
table, the display information for the cached fields, and the
114115
positioning information of the cached fields. For more information about
115-
these and other additional elements that make up the **pivotTableDefinition**, see the ISO/IEC 29500
116+
these and other additional elements that make up the `PivotTableDefinition`, see the ISO/IEC 29500
116117
specification.
117118

118119
### PivotField Class
119120

120-
The **PivotTableDefinition** element contains the **PivotField** (\<**pivotField**\>) elements. The following information from the ISO/IEC 29500 specification introduces the **PivotField** (\<**pivotField**\>) element.
121+
The `PivotTableDefinition` element contains the `PivotField` (`<pivotField/>`) elements. The following information from the ISO/IEC 29500 specification introduces the `PivotField` (`<pivotField/>`) element.
121122

122123
Represents a single field in the PivotTable. This element contains information about the field, including the collection of items in the field.
123124

124125
First, define the collection of fields that appear on the PivotTable
125-
using the **pivotFields** element. Each field
126+
using the `pivotFields` element. Each field
126127
serves as a cache for the data of that field in the data source. You do
127-
not need to define the cache. Instead, you can set the **item** element equal to **default** and have the user update the table when
128-
they open the document. The **showAll**
128+
not need to define the cache. Instead, you can set the `item` element equal to `default` and have the user update the table when
129+
they open the document. The `showAll`
129130
attribute is used to hide certain elements for that data dimension.
130131
After defining which fields are part of the table, the fields are
131132
applied to the four areas of the PivotTable.
132133

133134
### Pivot Cache Definition Class
134135

135-
The following information from the ISO/IEC 29500 specification introduces the **PivotCacheDefinition** (\<**pivotCacheDefinition**\>) element.
136+
The following information from the ISO/IEC 29500 specification introduces the `PivotCacheDefinition` (`<pivotCacheDefinition/>`) element.
136137

137138
The pivotCacheDefinition part defines each field in the
138139
pivotCacheRecords part, including field name and information about the
@@ -155,17 +156,17 @@ when you pivot the table. There are various types of data sources, for
155156
example: worksheets, database, OLAP cube, and other PivotTables.
156157

157158
The last part of the cache definition defines the fields of the data
158-
source using the **cacheField** element. The
159-
**cacheField** element is used for two
159+
source using the `cacheField` element. The
160+
`cacheField` element is used for two
160161
purposes: it defines the data type and formatting of the field, and it
161162
is used as a cache for shared strings. The pivot values are stored in
162163
the pivot cache records part. When a recurring string is used as a
163-
value, the cache record uses a reference into the **cacheField** collection of shared items.
164+
value, the cache record uses a reference into the `cacheField` collection of shared items.
164165

165166
### Pivot Cache Records Class
166167

167-
The following information from the ISO/IEC 29500 specification introduces the **PivotCacheRecords** (\<**pivotCacheRecords**\>) element.
168+
The following information from the ISO/IEC 29500 specification introduces the `PivotCacheRecords` (`<pivotCacheRecords/>`) element.
168169

169170
The pivotCacheRecords part contains the underlying data to be aggregated. It is a cache of the source data.
170171

171-
The cache records part can store any number of cached records. Each record has the same number of values defined as there are fields in the cache definition. Each record is defined with the **r** element. This record contains value items as child elements. You can provide certain typed values, such as Numeric, Boolean, or Date-Time, or you can reference into the shared items.
172+
The cache records part can store any number of cached records. Each record has the same number of values defined as there are fields in the cache definition. Each record is defined with the `r` element. This record contains value items as child elements. You can provide certain typed values, such as Numeric, Boolean, or Date-Time, or you can reference into the shared items.

0 commit comments

Comments
 (0)