Moving charts from one format to another is something that I’ve wanted to write/record content on for quite some time, but haven’t had the chance. I’ve added it to the list.
It is doable – you can just grab the chart part, related chart styles parts, and move them from excel into Word (while creating an embedded excel workbook). IIRC, it is necessary to tweak the markup in the chart part ever so slightly when doing this, but can’t recall the details.
In any case, the key to doing this is to manually do the same action, then use the Open XML SDK productivity tool to see the differences in markup, and then write code to create the same markup. See screen-cast #3 in the following list for details:
Introduction to Open XML Screen-Cast Series
You may be interested in the following screen-cast. It demonstrates how to programmatically update the chart data for a chart in Word:
Update Cached Data and Embedded XLSX for Charts in DOCX, PPTX
Cheers, Eric
BTW, thank you and congrats – you are the first forum post on EricWhite.com! 🙂
-
This reply was modified 8 years, 9 months ago by Eric White.
-
This reply was modified 8 years, 9 months ago by Eric White.