Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finishing Touch to Excel Graph
Message
De
04/09/2001 09:00:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
04/09/2001 08:52:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00552011
Message ID:
00552013
Vues:
14
>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 ?

What did Excel save in the corresponding commands for the macro?

Hilmar.

>
>
> 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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform