Bonjour,
Je travail sous VB2010 express, je voulais savoir comment l'on fait pour faire un graphe dans une nouvelle feuille (feuille graphe) et non en tant qu'objet.
pour l'instant j'ai ce code :
mais celui si créé un graphe sur un feuille existante.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 xlCharts = excelWorksheet2.ChartObjects myChart = xlCharts.Add(10, 10, 600, 450) chartPage = myChart.Chart chartRange = excelWorksheet.Range(excelWorksheet.Cells(1, 3), excelWorksheet.Cells(rowsTotal + 1, colsTotal + 1)) chartPage.SetSourceData(Source:=chartRange, PlotBy:=Microsoft.Office.Interop.Excel.XlRowCol.xlColumns) chartPage.ChartType = Microsoft.Office.Interop.Excel.XlChartType.xlLine
Cordialement
Partager