How do I create a DOCX file that has a chart and the datasource is in the DOCX file?

C

Colbert Zhou [MSFT]

Hello Dave,

Please download the following Word document from my SkyDrive. It is a word
document with embedded Excel file as Chart's data source,
http://cid-c2e0d62e8a095a30.skydrive.live.com/self.aspx/Public/Embedded Ex
cel%20Chart.docx

Typically, in document.xml, we can see,
- <a:graphic
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
- <a:graphicData
uri="http://schemas.openxmlformats.org/drawingml/2006/chart">
<c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships
" r:id="rId5" />
</a:graphicData>
</a:graphic>

Then we know, the relationship id of the chart is rId5. So we can look into
document.xml.rels to find the rId5. It is,
<Relationship Id="rId5"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/ch
art" Target="charts/chart1.xml" />

Then we go to charts/chart1.xml to observe its content, we can find,
- <c:externalData r:id="rId1">
<c:autoUpdate val="1" />
</c:externalData>

At last, we go to charts\_rels\chart1.xml.rels to find the rId1 of chart1,
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pa
ckage" Target="../embeddings/Microsoft_Excel_Worksheet1.xlsx" />

That is the flow of how it works. Hope this helps!


Best regards,
Ji Zhou
Microsoft Online Community Support
 
D

David Thielen

thank you - dave


Hello Dave,

Please download the following Word document from my SkyDrive. It is a word
document with embedded Excel file as Chart's data source,
http://cid-c2e0d62e8a095a30.skydrive.live.com/self.aspx/Public/Embedded Ex
cel%20Chart.docx

Typically, in document.xml, we can see,
- <a:graphic
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
- <a:graphicData
uri="http://schemas.openxmlformats.org/drawingml/2006/chart">
<c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships
" r:id="rId5" />
</a:graphicData>
</a:graphic>

Then we know, the relationship id of the chart is rId5. So we can look into
document.xml.rels to find the rId5. It is,
<Relationship Id="rId5"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/ch
art" Target="charts/chart1.xml" />

Then we go to charts/chart1.xml to observe its content, we can find,
- <c:externalData r:id="rId1">
<c:autoUpdate val="1" />
</c:externalData>

At last, we go to charts\_rels\chart1.xml.rels to find the rId1 of chart1,
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/pa
ckage" Target="../embeddings/Microsoft_Excel_Worksheet1.xlsx" />

That is the flow of how it works. Hope this helps!


Best regards,
Ji Zhou
Microsoft Online Community Support


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

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

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