Hi,
Here all are ole2 object
1) To change the column width of one particular cell
CREATE OBJECT h_excel 'EXCEL.APPLICATION' NO FLUSH. SET PROPERTY OF h_excel 'Visible' = 1. CALL METHOD OF h_excel 'Cells' = h_zl EXPORTING #1 = 1 #2 = 1. "Here we are changing 1st R 1st C SET PROPERTY OF h_zl 'Columnwidth' = .. "your data
2)To change the column width of range of cells
CALL METHOD OF h_excel 'Cells' = h_zl1 EXPORTING #1 = 1 #2 = 1."1st row 1st column CALL METHOD OF h_excel 'Cells' = h_zl2 EXPORTING #1 = 100 #2 = 1. "100th row first column CALL METHOD OF h_excel 'Range' = h_range EXPORTING #1 = h_zl1 #2 = h_zl2. "This mmeans that first column of 100 records SET PROPERTY OF h_range 'Columnwidth' = ..
Regards,
Manoj Kumar P
Add a comment