SourceFullName

Chart.SourceFullName property

获取此图表链接到的 xls/xlsx 文件的路径和名称。

public string SourceFullName { get; set; }

例子

显示如何在图表链接的情况下获取/设置外部 xls/xlsx 文档的全名。

Document doc = new Document(MyDir + "Shape with linked chart.docx");

Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

var sourceFullName = shape.Chart.SourceFullName;
Assert.True(sourceFullName.Contains("Examples\\Data\\Spreadsheet.xlsx"));

也可以看看