2012 Jun 15 5:34 AM
Hi Experts,
The below ABAP OLE2 code isn't working for me:
* Making the Series lines with no Markers
GET PROPERTY OF h_excel 'ActiveChart' = h_chart3.
CALL METHOD OF h_chart3
'SeriesCollection' = h_series
EXPORTING #1 = c_maxinv. "Name of the Series
* CALL METHOD OF
* h_chart3
* 'SeriesCollection(1)' = h_series.
CALL METHOD OF h_series 'Select'.
GET PROPERTY OF h_series 'Border' = h_series.
SET PROPERTY OF h_series 'MarkerStyle' = '-4142'. " None
for the below VBA:
ActiveChart.SeriesCollection(2).Select
With Selection.Border
.ColorIndex = 3
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
End Sub
-------------------------------
This one is also not working
* Making the Horizontal Axis Label to display in the bottom
CALL METHOD OF h_chart3 'Axes' = h_axis
EXPORTING #1 = 3. "xlTimeScale
SET PROPERTY OF h_axis 'HasAxis' = 1.
CALL METHOD OF h_axis 'Select'.
SET PROPERTY OF h_axis 'TickLabelPosition' = '-4134'. "xlLow
-------------
* Making the Max Inv / Min Inv lines - Red Color
* CALL METHOD OF
* h_chart3
* 'SeriesCollection(1)' = h_series.
CALL METHOD OF h_chart3 'SeriesCollection' = h_series EXPORTING #1 = c_maxinv.
CALL METHOD OF h_series 'Select'.
GET PROPERTY OF h_series 'Border' = h_series.
SET PROPERTY OF h_series 'ColorIndex' = '3'. " Red colored Line
SET PROPERTY OF h_series 'LineStyle' = '-4115'. " Dashed Line
SET PROPERTY OF h_series 'MarkerStyle' = '-4142'. " None
Can someone help me in this issue? Where did I go wrong in the above code?
Thanks & Regards,
Sowmya
2012 Jun 15 6:23 AM
Hi,
I think the problem is in passing the value of XlDash from abap to excel. Have a look at the follwoing code :
CALL METHOD OF h_chart4 'SeriesCollection' = series
EXPORTING
#1 = 'Required'. " Here required is my series name, in you case c_maxinv
GET PROPERTY OF series 'Border' = gv_border.
SET PROPERTY OF gv_border 'ColorIndex' = '3'.
* SET PROPERTY OF gv_border 'LineStyle' = '4'."'&HFFFFEFED'."'-4115'.
It works fine to change the color of the selected line and also to change the line style to XlDashDot. Even i am having problems in changing the linestyle to XlDash.
Thanks and regards,
kartik
Hi,
As of the line marker, I think in your coding you have mentioned the chart type as XlLineMarkers '65'. Instead give it as XlLine '4'. you will not get the marker.
Thanks and regards,
kartik
2012 Jun 15 6:23 AM
Hi,
I think the problem is in passing the value of XlDash from abap to excel. Have a look at the follwoing code :
CALL METHOD OF h_chart4 'SeriesCollection' = series
EXPORTING
#1 = 'Required'. " Here required is my series name, in you case c_maxinv
GET PROPERTY OF series 'Border' = gv_border.
SET PROPERTY OF gv_border 'ColorIndex' = '3'.
* SET PROPERTY OF gv_border 'LineStyle' = '4'."'&HFFFFEFED'."'-4115'.
It works fine to change the color of the selected line and also to change the line style to XlDashDot. Even i am having problems in changing the linestyle to XlDash.
Thanks and regards,
kartik
2012 Jun 15 8:00 AM
Hi,
As of the line marker, I think in your coding you have mentioned the chart type as XlLineMarkers '65'. Instead give it as XlLine '4'. you will not get the marker.
Thanks and regards,
kartik
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |