Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Add logo to excel using OLE in ABAP

$
0
0

Hi All,

 

I'm preparing an excel document using my Internal table and I also want to insert an logo at the top right corner of excel.

As the internal table data size can vary(Though only 13 columns) I'm unable to position the logo.

I've used the two methods as below but both have their limitations.

  •           CALL METHOD OF
                   wf_excel
                   'Range'        = wf_cells
                 EXPORTING
                   #1             = 'L1'
                   #2             = 'M4'.

               CALL METHOD OF
                   wf_cells
                   'Select' = select.

               GET PROPERTY OF
                   wf_worksheet
                   'Pictures' = picture.

               CALL METHOD OF
                   picture
                   'Insert'
                 EXPORTING
                   #1       = path.
    "Image file on the presentation server

Using this I'm able to position the logo correctly but once I delete the image from the path the logo on excel is removed.


  •           GET PROPERTY OF
                   wf_worksheet
                   'Shapes' = shapes.

               CALL METHOD OF
                   shapes  'AddPicture'
                 EXPORTING
                   #1           = path "Image file on the presentation server
                   #2           = '1'
                   #3           = '1'
                   #4           = 1052 "Left
                   #5           = 1 "Top
                   #6           = 90"Right
                   #7           = 90. "Bottom

     In this I have to give position which always will not be same ( As using Autofit property of columns)

 

Is there any other method I can use?

Where I can all the properties/ methods for OLE?


Viewing all articles
Browse latest Browse all 8332

Trending Articles