bonjour,
j'essaie de creer un graphe dans excel a l'aide de c#
le graphe est bien creer , il ne pause pas de probleme mais je n'arrive pas a mettre un titre . j'ai l'erreur suivante
Exception from HRESULT: 0x800A03EC
voici le code du graphe
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Excel.ChartObjects charts = ( Excel.ChartObjects ) sheet.ChartObjects ( Type.Missing );
Excel.ChartObject chart = charts.Add ( 1, 200, 600, 300 );
Excel.Chart xlChart = chart.Chart;
xlChart.HasTitle = true;
xlChart.ChartTitle.Text = "titre";
Excel.SeriesCollection sc = ( Excel.SeriesCollection ) xlChart.SeriesCollection ( Type.Missing );
Excel.Series s1 = sc.NewSeries ( );
s1.XValues = sheet.get_Range ( "A"+jump, "A"+(jump+table.Rows.Count) );
s1.Values = sheet.get_Range ( "F" + jump, "F"+( jump + table.Rows.Count ) );
xlChart.ChartType = Excel.XlChartType.xlXYScatterLinesNoMarkers; |
il plante sur xlChart.ChartTitle.Text = "titre";
qqn a t il une idée ?
merci
a++
Partager