Updating Data for an Embedded Chart in an Open XML WordprocessingML Document

Embedding charts in a word-processing document is a good way to put together documents that display graphical data. When you embed a chart in a document, an Open XML SpreadsheetML workbook is stored as an embedded part in the WordprocessingML document. The spreadsheet contains the data behind the chart. When you maintain that data, Word starts Excel, opening that embedded spreadsheet.

You may want programmatically update the data behind the chart. In addition to updating the data in the embedded spreadsheet, you also need to update the cached values in the chart.

I’ve created a seven minute video that walks through the process of creating an embedded chart:

Download – Example Code