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

  • Question

  • 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?


    赵召


    • Edited by 赵召 Monday, May 5, 2014 7:28 AM
    • Moved by Cindy Meister MVP Tuesday, May 6, 2014 3:52 PM Open XML question
    Monday, May 5, 2014 7:26 AM

Answers

All replies