REPORT UPLOAD_EXCEL
no standard page heading.
data: itab
like alsmex_tabline
occurs 0 with header line.
TYPES: Begin of t_record
, name1 like itab-value,
name2 like itab-value,
age like itab-value,
End of t_record.
DATA: it_record
type standard table of t_record
initial size 0, wa_record type t_record.
DATA: gd_currentrow
type i
.
*Selection Screen Declaration
*----------------------------
PARAMETER p_infile like rlgrap-filename.
************************************************************************
*START OF SELECTION
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_infile
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '14'
i_end_row = '31'
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
message e010
(zz
) with text
-001
. "Problem uploading Excel Spreadsheet
read table itab index 1.
gd_currentrow = itab-row.
if itab
-row
ne gd_currentrow
. append wa_record
to it_record
. gd_currentrow = itab-row.
wa_record-name1 = itab-value.
wa_record-name2 = itab-value.
wa_record-age = itab-value.
append wa_record
to it_record
.
loop at it_record
into wa_record
. (10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.