Hi all,
I have a requirement to
1) Output data from an internal table into excel, and
2) Create a chart from the data in excel
The ABAP program is driving the creation of the chart in excel.
So far I have been able to export the data using OLE calls, created a chart object,.
My question:
1. How to put Data Lables
2. How to put Data Table under the Chart
3. How to rename the series names
Below is the recorded Macro. I don't know how to convert it to ABAP.
Sub Macro1()
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
Application.CutCopyMode = False
ActiveChart.SetSourceData Source:=Range("B1:E4")
ActiveChart.SeriesCollection(1).Name = "=Sheet2!$A$2"
ActiveChart.SeriesCollection(2).Name = "=Sheet2!$A$3"
ActeChart.SeriesCollection(3).Name = "=Sheet2!$A$4"
ActiveChart.SetElement (msoElementDataLabelOutSideEnd)
ActiveChart.SetElement (msoElementDataTableWithLegendKeys)
End Sub
I have attached the current output and expected output.
I have searched about this in google but i could not find any solution for this.
Your help is greatly appreciated.
Thanks,
Lakshmi.