SourceFullName

Chart.SourceFullName property

Gets the path and name of an xls/xlsx file this chart is linked to.

public string SourceFullName { get; set; }

Examples

Shows how to get/set the full name of the external xls/xlsx document if the chart is linked.

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"));

sourceFullName = "D:\\Documents\\ChartData.xlsx";
Assert.True(sourceFullName.Equals("D:\\Documents\\ChartData.xlsx", StringComparison.Ordinal));

See Also