Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

how can i update charts' data in word document by using OpenXML

$
0
0

There was 18 charts In my word document . I can get the charts by code like this:

private MainDocumentPart mainDocPart;

......

ChartPart c_p = mainDocPart.ChartParts.FirstOrDefault();

Then I can update the data of charts.But the problem is this:

I have 18 charts In the document , and the charts index was random.So I can't get the chart by index yet:

ChartPart c_p = mainDocPart.ChartParts.ElementAt(index);//index is Integer Value

So can I appoint the ID or Name for each of the 18 charts?And Can I get Them By ID or Name?

I can update one Charts data by Openxml.If neither,How can I update datas for so many charts by OpenXml?


赵召



Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>