Procedure
*
* Form routine --> fills lines on EXCEL sheet with output values
*
form fill_cell using i j werte.
call method of excel 'CELLS' = cell exporting #1 = i #2 = j.
set property of cell 'VALUE' = werte.
endform.
*
* Fill the second line on EXCEL worksheet with header line info
*
perform fill_cell using 2 1 'Number'.
perform fill_cell using 2 2 'Form'.
perform fill_cell using 2 3 'Name'.
perform fill_cell using 2 4 'POBox'.
perform fill_cell using 2 5 'Street'.
perform fill_cell using 2 6 'ZIP'.
perform fill_cell using 2 7 'City'.
perform fill_cell using 2 8 'Tel.No'.
perform fill_cell using 2 9 'Tel.Fax'.
*
* Loop on table customer_data
*
loop at customer_data.
perform fill_cell using I 1 customer_data-kunnr.
perform fill_cell using i 2 customer_data-anred.
perform fill_cell using i 3 customer_data-name1.
perform fill_cell using i 4 customer_data-pfach.
perform fill_cell using I 5 customer_data-stras.
perform fill_cell using i 6 customer_data-pstlz.
perform fill_cell using i 7 customer_data-ort01.
perform fill_cell using i 8 customer_data-telf1.
perform fill_cell using i 9 customer_data-telfx.
i = i + 1.
endloop.
set property of excel 'VISIBLE' = 1.
How to Continue
Exercise 5: Release OLE Objects