ABAP顾问
分类:
2008-10-08 17:08:32
FORM getxlsdata .
DATA: ranges TYPE soi_range_list,
contents TYPE soi_generic_table,
onerange TYPE soi_range_item,
oneitem TYPE soi_generic_item ,
error TYPE REF TO i_oi_error ,
retcode TYPE soi_ret_string.
DATA: top TYPE i ,
left TYPE i ,
columns TYPE i ,
rows TYPE i .
CALL METHOD spreadsheet->get_selection
EXPORTING
no_flush = 'X'
IMPORTING
top = top
left = left
rows = rows
columns = columns
error = error
retcode = retcode.
CALL METHOD spreadsheet->insert_range_dim
EXPORTING
name = 'cell1'
no_flush = 'X'
top = top
left = left
rows = rows
columns = columns
IMPORTING
error = error.
APPEND 'cell1' TO ranges.
CALL METHOD spreadsheet->get_ranges_data
IMPORTING
contents = contents
error = error
retcode = retcode
CHANGING
ranges = ranges.
ENDFORM. " GETXLSDATA