Skip to Content
author's profile photo Former Member
Former Member

Ole2 to Excel: Column and Row Properties

Does anybody knows how can I give format to columns and rows to an MS Excel sheet created with Ole2.

I want to give columns width, and to fit to text.

Thanks.

Message was edited by: Joaquin Da Silva

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Nov 23, 2004 at 06:59 PM

    Hi Joaquin

    I believe this will do your work:

    ....
    DATA gs_range TYPE ole2_object .
    ....
    *--Creating OLE object for MS Excel
    ....
    
    CALL METHOD OF gs_excel 'Range' = gs_range 
         EXPORTING #1 = 'A:A' .
    SET PROPERTY OF gs_range 'ColumnWidth' = '20' .
    SET PROPERTY OF gs_range 'ShrinkToFit' = '1' .
    ....

    Hope this helps...

    *--Serdar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2004 at 04:17 PM

    It works, thank you very much.

    Do you know where can I find a list of all the properties I can set??.

    Now I want to give borders to cells and I'm having the same problem trying to find how to work it out.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Rob,

      Could you help me in issues of plotting Excel graphs using ABAP - OLE. This will help me a lot.

      The requirement is:-

      I am able to plot a graph for the data in ABAP program. But the graph gets plotted for all the Excel columns and I need graph only for few columns. How do I select only a few columns.

      Secondly, the chart types need to be different for different worksheet wcolumns as this is not the case.

      If you could provide some code sample, this will help a lot.

      Thanks in advance.

      Regards,

      Vinayak Kale

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.