Read Excel
Read Excel
lv_filename = iv_filename.
IF sy-subrc <> 0.
"Implement suitable error handling here
ENDIF.
TRY .
lo_excel_ref = NEW cl_fdt_xl_spreadsheet(
document_name = lv_filename
xdocument = lv_headerxstring ) .
CATCH cx_fdt_excel_core.
"Implement suitable error handling here
ENDTRY .
DATA(lo_data_ref) = lo_excel_ref-
>if_fdt_doc_spreadsheet~get_itab_from_worksheet(
lv_woksheetname ).
"now you have excel work sheet data in dyanmic internal table
r_data = lo_data_ref.
ENDIF.
ENDMETHOD.