SourceFullName

Chart.SourceFullName property

Obtient le chemin et le nom d’un fichier xls/xlsx auquel ce graphique est lié.

public string SourceFullName { get; set; }

Exemples

Montre comment obtenir/définir le nom complet du document xls/xlsx externe si le graphique est lié.

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

Voir également