How does a worksheet find it's pivot table?

D

David Thielen

Thre is an entry in sheet1.xml.rels:

<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"
Target="../pivotTables/pivotTable1.xml"/>

But I can't find rId1 used anywhere in sheet1.xml or elsewhere. Does a
worksheet just look for a
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"
in the .rels file and assume there is at most 1 of those and if it
exosts that's it pivot table definition?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
T

Tim Li - MSFT

Hello dave,

First, I'd like to recommend you a good article on this topic: Pivot Tables
in SpreadsheetML :
http://openxmldeveloper.org/articles/1510.aspx

As the article mentioned Worksheet looks for its pivot table in .rels file,
then the sheet1.xml.rels points out where to find the definition of its
pivot tables, if you have more than one pivot table the definition goes
like this:
- <Relationships
xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId2"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pi
votTable" Target="../pivotTables/pivotTable2.xml" />
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pi
votTable" Target="../pivotTables/pivotTable1.xml" />
</Relationships>

In "pivotTable1.xml" it defines the pivot table, such as location and etc.,
each pivotTable have its own definition file, and the XML goes like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <pivotTableDefinition
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
name="PivotTable2" cacheId="5" applyNumberFormats="0"
applyBorderFormats="0" applyFontFormats="0" applyPatternFormats="0"
applyAlignmentFormats="0" applyWidthHeightFormats="1" dataCaption="Values"
updatedVersion="3" minRefreshableVersion="3" showCalcMbrs="0"
useAutoFormatting="1" itemPrintTitles="1" createdVersion="3" indent="0"
outline="1" outlineData="1" multipleFieldFilters="0">
<location ref="H16:J33" firstHeaderRow="1" firstDataRow="1"
firstDataCol="0" />
- <pivotFields count="2">
<pivotField showAll="0" />
<pivotField showAll="0" />
</pivotFields>
<pivotTableStyleInfo name="PivotStyleLight16" showRowHeaders="1"
showColHeaders="1" showRowStripes="0" showColStripes="0" showLastColumn="1"
/>
</pivotTableDefinition>

Hope this helps you understand the process better.

Best regards,
Tim Li
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top