Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finishing Touch to Excel Graph
Message
De
04/09/2001 08:52:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Finishing Touch to Excel Graph
Divers
Thread ID:
00552011
Message ID:
00552011
Vues:
63
Below you see the code which succeeds in creating a Column Graph in Excel. I need a couple of finishing touches that I am hoping someone can provide. As it stands, the color of each of the columns is the same. I would like to set the color of each of the columns to something else. Also, I would like the columns to be a little wider. I did build a macro in excel to do this but am unable to figure out the VFP syntax that will accomplish it. Any ideas ?


oExcel = createObject("Excel.Application")
oBook = oExcel.Workbooks.Open(currentLoc()+"\techgoal.xls")
oExcel.visible = .t.


oPlotRange = oBook.Sheets[1].Range(cRange)
oChart = oBook.Charts.Add()
oChart.ChartWizard(oPlotRange)
oChart.HasLegend = .f.
oChart.HasTitle = .t.
oChart.ChartTitle.Characters.Text="SERVICE DEPARTMENT"+chr(13)+rptMonth+" Performance"+chr(13)+dtoc(dStart)+" - "+dtoc(dEnd)+chr(13)+"Print Date: "+dtoc(date())

oChart.Axes(2,1).HasTitle = .t.
oChart.Axes(2,1).AxisTitle.Characters.Text = "Percent of goal"

with oChart.Axes(2,1)
.MinimumScaleIsAuto = .t.
.MaximumScale = 100
.MinorUnitIsAuto = .t.
.MajorUnit = 10
endwith

oChart.PlotArea.Interior.ColorIndex = 2
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform