Hello,
We have a chart “Bar of Pie” in a word document which we can edit its data by using Microsoft Word option “Right Click > Edit Data > Edit Data in Excel”.
We are trying to accomplish the same idea Using Aspose.Words .NET, which is edit the chart data worksheet programmatically. The below doesn’t exist, but that’s what we are trying to accomplish:
Document myDoc = new Document("File.docx");
Node[] shapes = doc.GetChildNodes(NodeType.Shape, true).ToArray();
foreach (Shape shape in shapes)
{
var workbook = shape.Chart.ChartDataWorkbook;
var worksheet = workbook.Worksheets[0];
worksheet.Cells["F3"].Value = "m";
worksheet.Cells["F6"].Value = 5;
worksheet.Cells["F9"].Value = 0.25;
}
myDoc.Save("File_Updaded.docx"), Aspose.Words.SaveFormat.Docx);
Are you able to help?
Thanks a mil.
Similar topics:
https://forum.aspose.com/t/how-can-i-modify-ms-graph-chart-values/16685/6