cancel
Showing results for 
Search instead for 
Did you mean: 

Ole2 to Excel: Column and Row Properties

Former Member
0 Kudos

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

View Entire Topic
ssimsekler
Active Contributor
0 Kudos

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