Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Graficos con Automatizacion
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00699987
Message ID:
00700006
Vues:
17
>Estoy trabajando con auitomatizacion en excell, tengo una cantidad muy grande de informacion y necesito adicionarle el grafico con todas sus caracteristicas.
>
>La creacion del grafico esta Ok, pero el error me saca cuando deseo poner los valores encima de cada parte de mi grafico (En este caso, un pie o torta)
>
>El codigo que tengo es:
>
>WITH oExcel
> .Range("B2:C12").Select
> .Charts.Add
> .ActiveChart.ChartType = 70 &&xl3DPieExploded
> .ActiveChart.SetSourceData Source:=.Sheets("Hojas1").Range("B2:C12")
> .ActiveChartPlotBy:=2&&xlColumns
> .ActiveChart.Location Where:=1&&xlLocationAsNewSheet
> .ActiveChart.ApplyDataLabels Type:=5
> .ActiveChart.LegendKey:=.F.
> .ActiveChart.HasLeaderLines:=.T. &&xlDataLabelsShowLabelAndPercent
>EndWith
>
>El error lo saca en .ActiveChart.SetSourceData Source:=.Sheets("Hojas1").Range("B2:C12")
>
>
>Mi primera hoja se llama HOJAS1, el grafico es un pie o torta, la layenda aparece correctamente, pero el error me lo da cuando deseo poner los valores en cada pedazo de la torta.
>
>Alguna idea ?



Estas usando sintaxis de VBA en VFP. Debes traducirla a VFP por supuesto.

Ejemplos que no valen:
.ActiveChart.SetSourceData Source<b>:=<.b>.Sheets("Hojas1").Range("B2:C12")
.ActiveChartPlotBy<b>:=</b>2    && xlColumns
.ActiveChartPlotBy<b>:=</b>2    && xlColumns
En VFP:
.ActiveChart.SetSourceData([.Sheets("Hojas1").Range("B2:C12")])
.ActiveChartPlotBy = 2     && xlColumns
.ActiveChart.Location = 1  && xlLocationAsNewSheet
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform