pb 在EXCEL里增加饼形图,如何写资料标签格式为换行.
ls_ragedate = "A1:A"+string(ll_row)+",B1:B"+string(ll_row)
ll_with = io_exlapp.Sheets(as_sheet_name).chartobjects.add(0,0,400,400)
ll_with.chart.ChartType = 5
ll_with.chart.setsourcedata(io_exlapp.Sheets(as_sheet_name).range(ls_ragedate))
ll_with.chart.plotarea.interior.color = rgb(255,255,255)
ll_with.chart.chartarea.interior.color = rgb(255,255,255)
ll_with.chart.legend.interior.color = rgb(255,255,255)
ll_with.chart.SeriesCollection(1).border.linestyle = -4142
ll_with.chart.SeriesCollection(1).ApplyDataLabels
ll_with.chart.SeriesCollection(1).DataLabels.ShowCategoryName = True
ll_with.chart.SeriesCollection(1).DataLabels.ShowPercentage = True
ll_with.chart.SeriesCollection(1).DataLabels.Separator = '/'ll_with.chart.HasTitle = True
ll_with.chart.ChartTitle.Text ="本廠統計表織工金額"
ll_with.chart.Legend.Delete
红色字体为资料标签格式设置,换行经EXCEL录制出代码为
ActiveSheet.ChartObjects("瓜 1").Activate
ActiveChart.SeriesCollection(1).DataLabels.Select
Selection.Separator = "" & Chr(10) & ""
但在PB里面用
DataLabels.Separator =