report z. parameter p_file like rlgrap-filename. data: w_text type natxt, "message * this internal table should have the same structure * as *.xls file to be uploaded. E.g.: begin of it_data occurs 0, s1(10), "text field 1 s2(20), "text field 2 n1 type i, "integer number field end of it_data. start-of-selection. perform f_excel_upload tables it_data using p_file changing w_text. write: / 'Result =', w_text. end-of-selection. loop at it_data. write: / it_data-s1, it_data-s2, it_data-n1. endloop. form f_excel_upload tables p_download using value(p_filename) like rlgrap-filename changing p_text type natxt. data: it_intern type kcde_cells occurs 0 with header line, w_index type i, w_start_col type i value '1', w_start_row type i value '1', w_end_col type i value '256', w_end_row type i value '65536', w_rows like sy-fdpos. field-symbols: . call function 'KCD_EXCEL_OLE_TO_INT_CONVERT' EXPORTING filename = p_filename i_begin_col = w_start_col i_begin_row = w_start_row i_end_col = w_end_col i_end_row = w_end_row TABLES intern = it_intern EXCEPTIONS inconsistent_parameters = 1 upload_ole = 2 others = 3. if sy-subrc <> 0. p_text = 'Upload Error:'. write sy-subrc to p_text+14 left-justified. else. if it_intern[] is initial. p_text = 'No Data Uploaded.'. else. sort it_intern by row col. loop at it_intern. move : it_intern-col to w_index. assign component w_index of structure p_download to . if sy-subrc = 0. move : it_intern-value to . unassign . endif. at end of row. append p_download. clear p_download. endat. endloop. describe table p_download lines w_rows. p_text = 'Uploaded Rows:'. write w_rows to p_text+15 left-justified. endif. endif. endform. * end of source code *