DATA: excel TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cell TYPE ole2_object,
column TYPE ole2_object,
row TYPE ole2_object.
FORM fill_cell USING i_row i_col p_value.
CALL METHOD OF excel 'CELLS' = cell
EXPORTING #1 = i_row #2 = i_col.
SET PROPERTY OF cell 'VALUE' = p_value.
ENDFORM. "fill_cell
//在第position列插入列
FORM frm_insert_col USING position.
CALL METHOD OF excel 'COLUMNS' = column EXPORTING #1 = position .
CALL METHOD OF column 'INSERT'.
* CALL METHOD OF l_excel 'COLUMNS' = l_column
* EXPORTING
* #1 = 2.
ENDFORM.