.ActiveChart.ApplyDataLabels (.Type=3, .LegendKey=.F., .HasLeaderLines=.T.)
WITH oExcel .Range("B2:C12").Select .Charts.Add .ActiveChart.ChartType = -4102 * Source=.Sheets("Hojas1").Range("B2:C12") && incorrecto. Falta .Source y no hace falta *.ActiveChart.SetSourceData (Source,.ActiveChart.PlotBy =1) && mismo problema con named vars .ActiveChart.Location (1,"C_Graficos") With OExcel.ActiveChart .HasTitle = .T. .ChartTitle.Characters.Text = "grafica" EndWith .ActiveChart.HasLegend = .T. *.ActiveChart.ApplyDataLabels (.Type=3, .LegendKey=.F., .HasLeaderLines=.T.) .ActiveChart.ApplyDataLabels(3,.F.,.T.) && línea corregida * para ser mas claro puedes hacer: * ExcelType=3 * ExcelLegendKey=.F. * ExcelHasLeaderLines=.T. * .ActiveChart.ApplyDataLabels(ExcelType,ExcelLegendKey,ExcelHasLeaderLines) * o usar constantes (fijate en el Wiki de VFP por el archivo de constantes (.H) de Excel With oExcel.ActiveChart .Elevation = 25 .Perspective = 30 .Rotation = 0 .RightAngleAxes = .T. .HeightPercent = 70 EndWith ENDWITHNota: usa < pre > para formatear código en mensajes en UT.