Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Graph in Excel using OLE2 - properties

Former Member
0 Likes
785

Hi All,

     I 've developed the Graphing Feature using OLE2.

I'm unable to change the Chart Title and unable to create X-Axis & Y-Axis Labels.

Please find the screenshot of the output below:

I'm trying to write like this:

GET PROPERTY OF h_chart3 'ChartTitle' = h_title.

  SET PROPERTY OF h_title 'Chart title' = l_header.

  GET PROPERTY OF h_chart3 'Chart Options' = h_title.

  SET PROPERTY OF h_title 'Category (X) axis' = l_xaxis.

  GET PROPERTY OF h_chart3 'Chart Options' = h_title.

  SET PROPERTY OF h_title 'Category (Y) axis' = l_yaxis.

1) Can someone help me on this - on how to change the Title, insert Labels for X-Axis , Y-Axis?

2) How do I get all the Properties of OLE2?

3) I believe OLE2 is Obsolete. Does it affects if we use OLE2? Is there any better way to implement the Excel-Graph?

Thanks for your support!

Regards,

Sowmya

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
693

Just use the same method than Kartik P described in Copying data from Microsoft Excel to ABAP using OLE, Change those attributes in Excel while recording a macro and analyze the macro generated code to find the methods/attributes to use and on which objects to apply.

Regards,

Raymond

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
694

Just use the same method than Kartik P described in Copying data from Microsoft Excel to ABAP using OLE, Change those attributes in Excel while recording a macro and analyze the macro generated code to find the methods/attributes to use and on which objects to apply.

Regards,

Raymond

Read only

0 Likes
693

Thanks so much Raymond...

Read only

Former Member
0 Likes
693

U can find the properties in the excel macros and change the required things and insert also

Read only

Former Member
0 Likes
693

Since I'm new to this. I'm facing little difficulty in converting to ABAP. Could you please help me on this?

Now, I got the Macro:

Sub Graph_Macro1()

'

' Graph_Macro1 Macro

' Macro recorded 5/16/2012 by ! on KNTTS3C66

'

    With ActiveChart

        .HasTitle = True

        .ChartTitle.Characters.Text = "Inventory"

        .Axes(xlCategory, xlPrimary).HasTitle = True

        .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"

        .Axes(xlValue, xlPrimary).HasTitle = True

        .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "MB"

    End With

End Sub

How can I get the proper ABAP code for this?

-Sowmya